Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Service: New Swagger, sample, package renaming, turn on checkstyle #1301

Merged
merged 10 commits into from
Dec 3, 2016
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ jdk:
- openjdk7
script:
- mvn install -DskipTests=true
- mvn -pl !azure-batch,!azure-mgmt-website checkstyle:check
- mvn -pl !azure-batch checkstyle:check
- mvn -pl !azure-keyvault-cryptography,!azure-samples package javadoc:aggregate -DskipTests=true
7 changes: 3 additions & 4 deletions azure-mgmt-website/pom.xml → azure-mgmt-appservice/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>azure-mgmt-website</artifactId>
<artifactId>azure-mgmt-appservice</artifactId>
<packaging>jar</packaging>
<version>1.0.0-SNAPSHOT</version>

<name>Microsoft Azure SDK for Website Management</name>
<description>This package contains Microsoft Azure Website Management SDK.</description>
<name>Microsoft Azure SDK for App Service Management</name>
<description>This package contains Microsoft Azure App Service Management SDK.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.website;
package com.microsoft.azure.management.appservice;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.website;
package com.microsoft.azure.management.appservice;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Address information for domain registration.
Expand All @@ -16,6 +17,7 @@ public class Address {
/**
* Address 1.
*/
@JsonProperty(required = true)
private String address1;

/**
Expand All @@ -26,21 +28,25 @@ public class Address {
/**
* City.
*/
@JsonProperty(required = true)
private String city;

/**
* Country.
*/
@JsonProperty(required = true)
private String country;

/**
* Postal code.
*/
@JsonProperty(required = true)
private String postalCode;

/**
* State.
*/
@JsonProperty(required = true)
private String state;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.website;
package com.microsoft.azure.management.appservice;


/**
* Information about the formal API definition for the web app.
* Information about the formal API definition for the app.
*/
public class ApiDefinitionInfo {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
* license information.
*/

package com.microsoft.azure.management.website;
package com.microsoft.azure.management.appservice;

import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource;
import com.microsoft.azure.management.resources.fluentcore.model.Creatable;
import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
import com.microsoft.azure.management.resources.fluentcore.model.Wrapper;
import com.microsoft.azure.management.website.implementation.CertificateInner;
import com.microsoft.azure.management.appservice.implementation.CertificateInner;
import org.joda.time.DateTime;

import java.io.File;
Expand Down Expand Up @@ -41,7 +41,7 @@ public interface AppServiceCertificate extends
/**
* @return the pfx blob
*/
String pfxBlob();
byte[] pfxBlob();

/**
* @return the app name
Expand Down Expand Up @@ -156,20 +156,18 @@ interface WithCertificate {
WithPfxFilePassword withPfxFileFromUrl(String url);

/**
* Specifies the PFX certificate - key vault binding generated from
* an app service certificate order purchase.
* @param vaultId the id of the vault
* @param secretName the name of the key vault secret
* Specifies the app service certificate.
* @param certificateOrder the app service certificate order
* @return the next stage of the app service certificate definition
*/
WithCreate withCertificateOrderKeyVaultBinding(String vaultId, String secretName);
WithCreate withExistingCertificateOrder(AppServiceCertificateOrder certificateOrder);
}
/**
* An app service certificate definition allowing PFX certificate password to be set.
*/
interface WithPfxFilePassword {
/**
* Specifies the password to the PFX certificate
* Specifies the password to the PFX certificate.
* @param password the PFX certificate password
* @return the next stage of the app service certificate definition
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* license information.
*/

package com.microsoft.azure.management.website;
package com.microsoft.azure.management.appservice;

import com.microsoft.azure.management.resources.fluentcore.arm.models.IndependentChildResource;
import com.microsoft.azure.management.resources.fluentcore.model.Wrapper;
import com.microsoft.azure.management.website.implementation.AppServiceCertificateInner;
import com.microsoft.azure.management.appservice.implementation.AppServiceCertificateInner;

/**
* An immutable client-side representation of an Azure App Service Certificate.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
* license information.
*/

package com.microsoft.azure.management.website;
package com.microsoft.azure.management.appservice;

import com.microsoft.azure.management.keyvault.Vault;
import com.microsoft.azure.management.resources.fluentcore.arm.Region;
import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource;
import com.microsoft.azure.management.resources.fluentcore.model.Appliable;
import com.microsoft.azure.management.resources.fluentcore.model.Creatable;
import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
import com.microsoft.azure.management.resources.fluentcore.model.Updatable;
import com.microsoft.azure.management.resources.fluentcore.model.Wrapper;
import com.microsoft.azure.management.website.implementation.AppServiceCertificateOrderInner;
import com.microsoft.azure.management.appservice.implementation.AppServiceCertificateOrderInner;
import org.joda.time.DateTime;
import rx.Observable;

Expand Down Expand Up @@ -122,6 +123,19 @@ public interface AppServiceCertificateOrder extends
*/
Observable<AppServiceCertificateKeyVaultBinding> getKeyVaultBindingAsync();

/**
* Verifies the ownership of the domain by providing the Azure purchased domain.
* @param domain the Azure managed domain
*/
void verifyDomainOwnership(AppServiceDomain domain);

/**
* Verifies the ownership of the domain by providing the Azure purchased domain.
* @param domain the Azure managed domain
* @return an Observable to the result
*/
Observable<Void> verifyDomainOwnershipAsync(AppServiceDomain domain);

/**************************************************************
* Fluent interfaces to provision a App service certificate order
**************************************************************/
Expand All @@ -133,7 +147,8 @@ interface Definition extends
DefinitionStages.Blank,
DefinitionStages.WithHostName,
DefinitionStages.WithCertificateSku,
DefinitionStages.WithValidYears,
DefinitionStages.WithDomainVerificationFromWebApp,
DefinitionStages.WithKeyVault,
DefinitionStages.WithCreate {
}

Expand Down Expand Up @@ -164,13 +179,75 @@ interface WithHostName {
*/
interface WithCertificateSku {
/**
* Specifies the SKU of the certificate. Standard type will only provide
* Specifies the SKU of the certificate to be standard. It will only provide
* SSL support to the hostname, and www.hostname. Wildcard type will provide
* SSL support to any sub-domain under the hostname.
* @param sku the SKU of the certificate
* @return the next stage of the app service certificate definition
*/
WithValidYears withSku(CertificateProductType sku);
WithDomainVerificationFromWebApp withStandardSku();

/**
* Specifies the SKU of the certificate to be wildcard. It will provide
* SSL support to any sub-domain under the hostname.
* @return the next stage of the app service certificate definition
*/
WithDomainVerification withWildcardSku();
}

/**
* An app service certificate order definition allowing domain verification method to be set.
*/
interface WithDomainVerification {
/**
* Specifies the Azure managed domain to verify the ownership of the domain.
* @param domain the Azure managed domain
* @return the next stage of the app service certificate definition
*/
WithKeyVault withDomainVerification(AppServiceDomain domain);
}

/**
* An app service certificate order definition allowing more domain verification methods to be set.
*/
interface WithDomainVerificationFromWebApp extends WithDomainVerification {
/**
* Specifies the web app to verify the ownership of the domain. The web app needs to
* be bound to the hostname for the certificate.
* @param webApp the web app bound to the hostname
* @return the next stage of the app service certificate definition
*/
WithKeyVault withWebAppVerification(WebAppBase<?> webApp);
}

/**
* An app service certificate order definition allowing more domain verification methods to be set.
*/
interface WithKeyVault {
/**
* Specifies an existing key vault to store the certificate private key.
*
* The vault MUST allow 2 service principals to read/write secrets:
* f3c21649-0979-4721-ac85-b0216b2cf413 and abfa0a7c-a6b6-4736-8310-5855508787cd.
* If they don't have access, an attempt will be made to grant access. If you are
* logged in from an identity without access to the Active Directory Graph, this
* attempt will fail.
*
* @param vault the vault to store the private key
* @return the next stage of the app service certificate definition
*/
WithCreate withExistingKeyVault(Vault vault);

/**
* Creates a new key vault to store the certificate private key.
*
* DO NOT use this method if you are logged in from an identity without access
* to the Active Directory Graph.
*
* @param vaultName the name of the new key vault
* @param region the region to create the vault
* @return the next stage of the app service certificate definition
*/
WithCreate withNewKeyVault(String vaultName, Region region);
}

/**
Expand Down Expand Up @@ -204,6 +281,7 @@ interface WithAutoRenew {
*/
interface WithCreate extends
Creatable<AppServiceCertificateOrder>,
WithValidYears,
WithAutoRenew,
GroupableResource.DefinitionWithTags<WithCreate> {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* license information.
*/

package com.microsoft.azure.management.website;
package com.microsoft.azure.management.appservice;

import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* license information.
*/

package com.microsoft.azure.management.website;
package com.microsoft.azure.management.appservice;

import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* license information.
*/

package com.microsoft.azure.management.website;
package com.microsoft.azure.management.appservice;

import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource;
import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName;
Expand All @@ -13,8 +13,9 @@
import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
import com.microsoft.azure.management.resources.fluentcore.model.Updatable;
import com.microsoft.azure.management.resources.fluentcore.model.Wrapper;
import com.microsoft.azure.management.website.implementation.DomainInner;
import com.microsoft.azure.management.appservice.implementation.DomainInner;
import org.joda.time.DateTime;
import rx.Observable;

import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -105,6 +106,20 @@ public interface AppServiceDomain extends
*/
DomainPurchaseConsent consent();

/**
* Verifies the ownership of the domain for a certificate order bound to this domain.
* @param certificateOrderName the name of the certificate order
* @param domainVerificationToken the domain verification token for the certificate order
*/
void verifyDomainOwnership(String certificateOrderName, String domainVerificationToken);

/**
* Verifies the ownership of the domain for a certificate order bound to this domain.
* @param certificateOrderName the name of the certificate order
* @param domainVerificationToken the domain verification token for the certificate order
* @return the Observable to the result
*/
Observable<Void> verifyDomainOwnershipAsync(String certificateOrderName, String domainVerificationToken);

/**************************************************************
* Fluent interfaces to provision a domain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* license information.
*/

package com.microsoft.azure.management.website;
package com.microsoft.azure.management.appservice;

import com.microsoft.azure.PagedList;
import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup;
Expand All @@ -25,7 +25,7 @@ public interface AppServiceDomains extends
SupportsDeletingById,
SupportsDeletingByGroup,
SupportsGettingByGroup<AppServiceDomain>,
SupportsGettingById<AppServiceDomain>{
SupportsGettingById<AppServiceDomain> {
/**
* List the agreements for purchasing a domain with a specific top level extension.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* license information.
*/

package com.microsoft.azure.management.website;
package com.microsoft.azure.management.appservice;

import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource;
import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName;
Expand All @@ -13,7 +13,7 @@
import com.microsoft.azure.management.resources.fluentcore.model.Refreshable;
import com.microsoft.azure.management.resources.fluentcore.model.Updatable;
import com.microsoft.azure.management.resources.fluentcore.model.Wrapper;
import com.microsoft.azure.management.website.implementation.AppServicePlanInner;
import com.microsoft.azure.management.appservice.implementation.AppServicePlanInner;

/**
* An immutable client-side representation of an Azure App Service Plan.
Expand Down
Loading