Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License. See License.txt in the project root for
license information.
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
package com.microsoft.azure.management.appservice;
import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.azure.management.apigeneration.Fluent;
import com.microsoft.azure.management.apigeneration.Method;
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.appservice.implementation.AppServiceCertificateOrderInner;
import com.microsoft.azure.management.appservice.implementation.AppServiceManager;
import org.joda.time.DateTime;
import rx.Completable;
import rx.Observable;
An immutable client-side representation of an Azure App Service certificate order.
/**
* An immutable client-side representation of an Azure App Service certificate order.
*/
@Fluent(ContainerName = "/Microsoft.Azure.Management.AppService.Fluent")
@Beta
public interface AppServiceCertificateOrder extends
GroupableResource<AppServiceManager, AppServiceCertificateOrderInner>,
Refreshable<AppServiceCertificateOrder>,
Updatable<AppServiceCertificateOrder.Update> {
Returns: certificate's distinguished name
/**
* @return certificate's distinguished name
*/
String distinguishedName();
Returns: the domain verification token
/**
* @return the domain verification token
*/
String domainVerificationToken();
Returns: duration in years (must be between 1 and 3)
/**
* @return duration in years (must be between 1 and 3)
*/
int validityInYears();
Returns: the certificate key size
/**
* @return the certificate key size
*/
int keySize();
Returns: the certificate product type
/**
* @return the certificate product type
*/
CertificateProductType productType();
Returns: if the certificate should be automatically renewed upon expiration
/**
* @return if the certificate should be automatically renewed upon expiration
*/
boolean autoRenew();
Returns: current order status
/**
* @return current order status
*/
CertificateOrderStatus status();
Returns: the signed certificate
/**
* @return the signed certificate
*/
CertificateDetails signedCertificate();
Returns: last certificate signing request that was created for this order
/**
* @return last certificate signing request that was created for this order
*/
String certificateSigningRequest();
Returns: the intermediate certificate
/**
* @return the intermediate certificate
*/
CertificateDetails intermediate();
Returns: the root certificate
/**
* @return the root certificate
*/
CertificateDetails root();
Returns: current serial number of the certificate
/**
* @return current serial number of the certificate
*/
String serialNumber();
Returns: last issuance time
/**
* @return last issuance time
*/
DateTime lastCertificateIssuanceTime();
Returns: expiration time
/**
* @return expiration time
*/
DateTime expirationTime();
Bind a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready.
Params: - certificateName – the name of the Key Vault Secret
- vault – the key vault to store the certificate
Returns: a binding containing the key vault information
/**
* Bind a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready.
* @param certificateName the name of the Key Vault Secret
* @param vault the key vault to store the certificate
* @return a binding containing the key vault information
*/
AppServiceCertificateKeyVaultBinding createKeyVaultBinding(String certificateName, Vault vault);
Bind a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready.
Params: - certificateName – the name of the Key Vault Secret
- vault – the key vault to store the certificate
Returns: a binding containing the key vault information
/**
* Bind a Key Vault secret to a certificate store that will be used for storing the certificate once it's ready.
* @param certificateName the name of the Key Vault Secret
* @param vault the key vault to store the certificate
* @return a binding containing the key vault information
*/
Observable<AppServiceCertificateKeyVaultBinding> createKeyVaultBindingAsync(String certificateName, Vault vault);
Returns: the state of the Key Vault secret
/**
* @return the state of the Key Vault secret
*/
@Method
AppServiceCertificateKeyVaultBinding getKeyVaultBinding();
Returns: the state of the Key Vault secret
/**
* @return the state of the Key Vault secret
*/
@Method
Observable<AppServiceCertificateKeyVaultBinding> getKeyVaultBindingAsync();
Verifies the ownership of the domain by providing the Azure purchased domain.
Params: - domain – the Azure managed domain
/**
* 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.
Params: - domain – the Azure managed domain
Returns: an Observable to the result
/**
* Verifies the ownership of the domain by providing the Azure purchased domain.
* @param domain the Azure managed domain
* @return an Observable to the result
*/
Completable verifyDomainOwnershipAsync(AppServiceDomain domain);
/**************************************************************
* Fluent interfaces to provision a App service certificate order
**************************************************************/
Container interface for all the definitions that need to be implemented.
/**
* Container interface for all the definitions that need to be implemented.
*/
interface Definition extends
DefinitionStages.Blank,
DefinitionStages.WithHostName,
DefinitionStages.WithCertificateSku,
DefinitionStages.WithDomainVerificationFromWebApp,
DefinitionStages.WithKeyVault,
DefinitionStages.WithCreate {
}
Grouping of all the app service certificate order definition stages.
/**
* Grouping of all the app service certificate order definition stages.
*/
interface DefinitionStages {
An app service certificate order definition allowing resource group to be set.
/**
* An app service certificate order definition allowing resource group to be set.
*/
interface Blank extends GroupableResource.DefinitionStages.WithExistingResourceGroup<WithHostName> {
}
An app service certificate order definition allowing hostname to be set.
/**
* An app service certificate order definition allowing hostname to be set.
*/
interface WithHostName {
Specifies the hostname the certificate binds to.
Params: - hostName – the bare host name, without "www". Use *. prefix if it's a wild card certificate
Returns: the next stage of the definition
/**
* Specifies the hostname the certificate binds to.
* @param hostName the bare host name, without "www". Use *. prefix if it's a wild card certificate
* @return the next stage of the definition
*/
WithCertificateSku withHostName(String hostName);
}
An app service certificate order definition allowing SKU to be set.
/**
* An app service certificate order definition allowing SKU to be set.
*/
interface WithCertificateSku {
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.
Returns: the next stage of the definition
/**
* 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.
* @return the next stage of the definition
*/
WithDomainVerificationFromWebApp withStandardSku();
Specifies the SKU of the certificate to be wildcard. It will provide
SSL support to any sub-domain under the hostname.
Returns: the next stage of the definition
/**
* 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 definition
*/
WithDomainVerification withWildcardSku();
}
An app service certificate order definition allowing domain verification method to be set.
/**
* 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.
Params: - domain – the Azure managed domain
Returns: the next stage of the definition
/**
* Specifies the Azure managed domain to verify the ownership of the domain.
* @param domain the Azure managed domain
* @return the next stage of the definition
*/
WithKeyVault withDomainVerification(AppServiceDomain domain);
}
An app service certificate order definition allowing more domain verification methods to be set.
/**
* 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.
Params: - webApp – the web app bound to the hostname
Returns: the next stage of the definition
/**
* 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 definition
*/
WithKeyVault withWebAppVerification(WebAppBase webApp);
}
An app service certificate order definition allowing more domain verification methods to be set.
/**
* 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.
Params: - vault – the vault to store the private key
Returns: the next stage of the definition
/**
* 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 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.
Params: - vaultName – the name of the new key vault
- region – the region to create the vault
Returns: the next stage of the definition
/**
* 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 definition
*/
WithCreate withNewKeyVault(String vaultName, Region region);
}
An app service certificate order definition allowing valid years to be set.
/**
* An app service certificate order definition allowing valid years to be set.
*/
interface WithValidYears {
Specifies the valid years of the certificate.
Params: - years – minimum 1 year, and maximum 3 years
Returns: the next stage of the definition
/**
* Specifies the valid years of the certificate.
* @param years minimum 1 year, and maximum 3 years
* @return the next stage of the definition
*/
WithCreate withValidYears(int years);
}
An app service certificate order definition allowing auto-renew settings to be set.
/**
* An app service certificate order definition allowing auto-renew settings to be set.
*/
interface WithAutoRenew {
Specifies if the certificate should be auto-renewed.
Params: - enabled – true if the certificate order should be auto-renewed
Returns: the next stage of the definition
/**
* Specifies if the certificate should be auto-renewed.
* @param enabled true if the certificate order should be auto-renewed
* @return the next stage of the definition
*/
WithCreate withAutoRenew(boolean enabled);
}
An app service certificate order definition with sufficient inputs to create a new
app service certificate order in the cloud, but exposing additional optional inputs to
specify.
/**
* An app service certificate order definition with sufficient inputs to create a new
* app service certificate order in the cloud, but exposing additional optional inputs to
* specify.
*/
interface WithCreate extends
Creatable<AppServiceCertificateOrder>,
WithValidYears,
WithAutoRenew,
GroupableResource.DefinitionWithTags<WithCreate> {
}
}
Grouping of all the app service certificate order update stages.
/**
* Grouping of all the app service certificate order update stages.
*/
interface UpdateStages {
An app service certificate order definition allowing auto-renew settings to be set.
/**
* An app service certificate order definition allowing auto-renew settings to be set.
*/
interface WithAutoRenew {
Specifies if the certificate should be auto-renewed.
Params: - enabled – true if the certificate order should be auto-renewed
Returns: the next stage of the update
/**
* Specifies if the certificate should be auto-renewed.
* @param enabled true if the certificate order should be auto-renewed
* @return the next stage of the update
*/
Update withAutoRenew(boolean enabled);
}
}
The template for an app service certificate order update operation, containing all the settings that can be modified.
/**
* The template for an app service certificate order update operation, containing all the settings that can be modified.
*/
interface Update extends
Appliable<AppServiceCertificateOrder>,
UpdateStages.WithAutoRenew,
GroupableResource.UpdateWithTags<Update> {
}
}