All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.appservice.WindowsFunctionAppSlot Maven / Gradle / Ivy

// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.appservice;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.appservice.WindowsFunctionAppSlotArgs;
import com.pulumi.azure.appservice.inputs.WindowsFunctionAppSlotState;
import com.pulumi.azure.appservice.outputs.WindowsFunctionAppSlotAuthSettings;
import com.pulumi.azure.appservice.outputs.WindowsFunctionAppSlotAuthSettingsV2;
import com.pulumi.azure.appservice.outputs.WindowsFunctionAppSlotBackup;
import com.pulumi.azure.appservice.outputs.WindowsFunctionAppSlotConnectionString;
import com.pulumi.azure.appservice.outputs.WindowsFunctionAppSlotIdentity;
import com.pulumi.azure.appservice.outputs.WindowsFunctionAppSlotSiteConfig;
import com.pulumi.azure.appservice.outputs.WindowsFunctionAppSlotSiteCredential;
import com.pulumi.azure.appservice.outputs.WindowsFunctionAppSlotStorageAccount;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Windows Function App Slot.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.storage.Account;
 * import com.pulumi.azure.storage.AccountArgs;
 * import com.pulumi.azure.appservice.ServicePlan;
 * import com.pulumi.azure.appservice.ServicePlanArgs;
 * import com.pulumi.azure.appservice.WindowsFunctionApp;
 * import com.pulumi.azure.appservice.WindowsFunctionAppArgs;
 * import com.pulumi.azure.appservice.inputs.WindowsFunctionAppSiteConfigArgs;
 * import com.pulumi.azure.appservice.WindowsFunctionAppSlot;
 * import com.pulumi.azure.appservice.WindowsFunctionAppSlotArgs;
 * import com.pulumi.azure.appservice.inputs.WindowsFunctionAppSlotSiteConfigArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("windowsfunctionappsa")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("LRS")
 *             .build());
 * 
 *         var exampleServicePlan = new ServicePlan("exampleServicePlan", ServicePlanArgs.builder()
 *             .name("example-app-service-plan")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .osType("Windows")
 *             .skuName("Y1")
 *             .build());
 * 
 *         var exampleWindowsFunctionApp = new WindowsFunctionApp("exampleWindowsFunctionApp", WindowsFunctionAppArgs.builder()
 *             .name("example-windows-function-app")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .storageAccountName(exampleAccount.name())
 *             .servicePlanId(exampleServicePlan.id())
 *             .siteConfig()
 *             .build());
 * 
 *         var exampleWindowsFunctionAppSlot = new WindowsFunctionAppSlot("exampleWindowsFunctionAppSlot", WindowsFunctionAppSlotArgs.builder()
 *             .name("example-slot")
 *             .functionAppId(exampleWindowsFunctionApp.id())
 *             .storageAccountName(exampleAccount.name())
 *             .siteConfig()
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * A Windows Function App Slot can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:appservice/windowsFunctionAppSlot:WindowsFunctionAppSlot example "/subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.Web/sites/site1/slots/slot1" * ``` * */ @ResourceType(type="azure:appservice/windowsFunctionAppSlot:WindowsFunctionAppSlot") public class WindowsFunctionAppSlot extends com.pulumi.resources.CustomResource { /** * A map of key-value pairs for [App Settings](https://docs.microsoft.com/azure/azure-functions/functions-app-settings) and custom values. * */ @Export(name="appSettings", refs={Map.class,String.class}, tree="[0,1,1]") private Output> appSettings; /** * @return A map of key-value pairs for [App Settings](https://docs.microsoft.com/azure/azure-functions/functions-app-settings) and custom values. * */ public Output>> appSettings() { return Codegen.optional(this.appSettings); } /** * an `auth_settings` block as detailed below. * */ @Export(name="authSettings", refs={WindowsFunctionAppSlotAuthSettings.class}, tree="[0]") private Output authSettings; /** * @return an `auth_settings` block as detailed below. * */ public Output> authSettings() { return Codegen.optional(this.authSettings); } /** * an `auth_settings_v2` block as detailed below. * */ @Export(name="authSettingsV2", refs={WindowsFunctionAppSlotAuthSettingsV2.class}, tree="[0]") private Output authSettingsV2; /** * @return an `auth_settings_v2` block as detailed below. * */ public Output> authSettingsV2() { return Codegen.optional(this.authSettingsV2); } /** * a `backup` block as detailed below. * */ @Export(name="backup", refs={WindowsFunctionAppSlotBackup.class}, tree="[0]") private Output backup; /** * @return a `backup` block as detailed below. * */ public Output> backup() { return Codegen.optional(this.backup); } /** * Should built-in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting. Defaults to `true`. * */ @Export(name="builtinLoggingEnabled", refs={Boolean.class}, tree="[0]") private Output builtinLoggingEnabled; /** * @return Should built-in logging be enabled. Configures `AzureWebJobsDashboard` app setting based on the configured storage setting. Defaults to `true`. * */ public Output> builtinLoggingEnabled() { return Codegen.optional(this.builtinLoggingEnabled); } /** * Should the Function App Slot use Client Certificates. * */ @Export(name="clientCertificateEnabled", refs={Boolean.class}, tree="[0]") private Output clientCertificateEnabled; /** * @return Should the Function App Slot use Client Certificates. * */ public Output> clientCertificateEnabled() { return Codegen.optional(this.clientCertificateEnabled); } /** * Paths to exclude when using client certificates, separated by ; * */ @Export(name="clientCertificateExclusionPaths", refs={String.class}, tree="[0]") private Output clientCertificateExclusionPaths; /** * @return Paths to exclude when using client certificates, separated by ; * */ public Output> clientCertificateExclusionPaths() { return Codegen.optional(this.clientCertificateExclusionPaths); } /** * The mode of the Function App Slot's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser`. Defaults to `Optional`. * */ @Export(name="clientCertificateMode", refs={String.class}, tree="[0]") private Output clientCertificateMode; /** * @return The mode of the Function App Slot's client certificates requirement for incoming requests. Possible values are `Required`, `Optional`, and `OptionalInteractiveUser`. Defaults to `Optional`. * */ public Output> clientCertificateMode() { return Codegen.optional(this.clientCertificateMode); } /** * a `connection_string` block as detailed below. * */ @Export(name="connectionStrings", refs={List.class,WindowsFunctionAppSlotConnectionString.class}, tree="[0,1]") private Output> connectionStrings; /** * @return a `connection_string` block as detailed below. * */ public Output>> connectionStrings() { return Codegen.optional(this.connectionStrings); } /** * Force disable the content share settings. * */ @Export(name="contentShareForceDisabled", refs={Boolean.class}, tree="[0]") private Output contentShareForceDisabled; /** * @return Force disable the content share settings. * */ public Output> contentShareForceDisabled() { return Codegen.optional(this.contentShareForceDisabled); } /** * The identifier used by App Service to perform domain ownership verification via DNS TXT record. * */ @Export(name="customDomainVerificationId", refs={String.class}, tree="[0]") private Output customDomainVerificationId; /** * @return The identifier used by App Service to perform domain ownership verification via DNS TXT record. * */ public Output customDomainVerificationId() { return this.customDomainVerificationId; } /** * The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans. Defaults to `0`. * */ @Export(name="dailyMemoryTimeQuota", refs={Integer.class}, tree="[0]") private Output dailyMemoryTimeQuota; /** * @return The amount of memory in gigabyte-seconds that your application is allowed to consume per day. Setting this value only affects function apps in Consumption Plans. Defaults to `0`. * */ public Output> dailyMemoryTimeQuota() { return Codegen.optional(this.dailyMemoryTimeQuota); } /** * The default hostname of the Windows Function App Slot. * */ @Export(name="defaultHostname", refs={String.class}, tree="[0]") private Output defaultHostname; /** * @return The default hostname of the Windows Function App Slot. * */ public Output defaultHostname() { return this.defaultHostname; } /** * Is the Windows Function App Slot enabled. Defaults to `true`. * */ @Export(name="enabled", refs={Boolean.class}, tree="[0]") private Output enabled; /** * @return Is the Windows Function App Slot enabled. Defaults to `true`. * */ public Output> enabled() { return Codegen.optional(this.enabled); } /** * Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. * */ @Export(name="ftpPublishBasicAuthenticationEnabled", refs={Boolean.class}, tree="[0]") private Output ftpPublishBasicAuthenticationEnabled; /** * @return Should the default FTP Basic Authentication publishing profile be enabled. Defaults to `true`. * */ public Output> ftpPublishBasicAuthenticationEnabled() { return Codegen.optional(this.ftpPublishBasicAuthenticationEnabled); } /** * The name of the Windows Function App this Slot is a member of. Changing this forces a new resource to be created. * */ @Export(name="functionAppId", refs={String.class}, tree="[0]") private Output functionAppId; /** * @return The name of the Windows Function App this Slot is a member of. Changing this forces a new resource to be created. * */ public Output functionAppId() { return this.functionAppId; } /** * The runtime version associated with the Function App Slot. Defaults to `~4`. * */ @Export(name="functionsExtensionVersion", refs={String.class}, tree="[0]") private Output functionsExtensionVersion; /** * @return The runtime version associated with the Function App Slot. Defaults to `~4`. * */ public Output> functionsExtensionVersion() { return Codegen.optional(this.functionsExtensionVersion); } /** * The ID of the App Service Environment used by Function App Slot. * */ @Export(name="hostingEnvironmentId", refs={String.class}, tree="[0]") private Output hostingEnvironmentId; /** * @return The ID of the App Service Environment used by Function App Slot. * */ public Output hostingEnvironmentId() { return this.hostingEnvironmentId; } /** * Can the Function App Slot only be accessed via HTTPS?. Defaults to `false`. * */ @Export(name="httpsOnly", refs={Boolean.class}, tree="[0]") private Output httpsOnly; /** * @return Can the Function App Slot only be accessed via HTTPS?. Defaults to `false`. * */ public Output> httpsOnly() { return Codegen.optional(this.httpsOnly); } /** * an `identity` block as detailed below. * */ @Export(name="identity", refs={WindowsFunctionAppSlotIdentity.class}, tree="[0]") private Output identity; /** * @return an `identity` block as detailed below. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * The User Assigned Identity ID used for accessing KeyVault secrets. The identity must be assigned to the application in the `identity` block. [For more information see - Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) * */ @Export(name="keyVaultReferenceIdentityId", refs={String.class}, tree="[0]") private Output keyVaultReferenceIdentityId; /** * @return The User Assigned Identity ID used for accessing KeyVault secrets. The identity must be assigned to the application in the `identity` block. [For more information see - Access vaults with a user-assigned identity](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#access-vaults-with-a-user-assigned-identity) * */ public Output keyVaultReferenceIdentityId() { return this.keyVaultReferenceIdentityId; } /** * The Kind value for this Windows Function App Slot. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return The Kind value for this Windows Function App Slot. * */ public Output kind() { return this.kind; } /** * Specifies the name of the Windows Function App Slot. Changing this forces a new resource to be created. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Specifies the name of the Windows Function App Slot. Changing this forces a new resource to be created. * */ public Output name() { return this.name; } /** * A list of outbound IP addresses. For example `["52.23.25.3", "52.143.43.12"]`. * */ @Export(name="outboundIpAddressLists", refs={List.class,String.class}, tree="[0,1]") private Output> outboundIpAddressLists; /** * @return A list of outbound IP addresses. For example `["52.23.25.3", "52.143.43.12"]`. * */ public Output> outboundIpAddressLists() { return this.outboundIpAddressLists; } /** * A comma separated list of outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12`. * */ @Export(name="outboundIpAddresses", refs={String.class}, tree="[0]") private Output outboundIpAddresses; /** * @return A comma separated list of outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12`. * */ public Output outboundIpAddresses() { return this.outboundIpAddresses; } /** * A list of possible outbound IP addresses, not all of which are necessarily in use. This is a superset of `outbound_ip_address_list`. For example `["52.23.25.3", "52.143.43.12"]`. * */ @Export(name="possibleOutboundIpAddressLists", refs={List.class,String.class}, tree="[0,1]") private Output> possibleOutboundIpAddressLists; /** * @return A list of possible outbound IP addresses, not all of which are necessarily in use. This is a superset of `outbound_ip_address_list`. For example `["52.23.25.3", "52.143.43.12"]`. * */ public Output> possibleOutboundIpAddressLists() { return this.possibleOutboundIpAddressLists; } /** * A comma separated list of possible outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12,52.143.43.17`. This is a superset of `outbound_ip_addresses`. For example `["52.23.25.3", "52.143.43.12","52.143.43.17"]`. * */ @Export(name="possibleOutboundIpAddresses", refs={String.class}, tree="[0]") private Output possibleOutboundIpAddresses; /** * @return A comma separated list of possible outbound IP addresses as a string. For example `52.23.25.3,52.143.43.12,52.143.43.17`. This is a superset of `outbound_ip_addresses`. For example `["52.23.25.3", "52.143.43.12","52.143.43.17"]`. * */ public Output possibleOutboundIpAddresses() { return this.possibleOutboundIpAddresses; } /** * Should public network access be enabled for the Function App. Defaults to `true`. * */ @Export(name="publicNetworkAccessEnabled", refs={Boolean.class}, tree="[0]") private Output publicNetworkAccessEnabled; /** * @return Should public network access be enabled for the Function App. Defaults to `true`. * */ public Output> publicNetworkAccessEnabled() { return Codegen.optional(this.publicNetworkAccessEnabled); } /** * The ID of the Service Plan in which to run this slot. If not specified the same Service Plan as the Windows Function App will be used. * */ @Export(name="servicePlanId", refs={String.class}, tree="[0]") private Output servicePlanId; /** * @return The ID of the Service Plan in which to run this slot. If not specified the same Service Plan as the Windows Function App will be used. * */ public Output> servicePlanId() { return Codegen.optional(this.servicePlanId); } /** * a `site_config` block as detailed below. * */ @Export(name="siteConfig", refs={WindowsFunctionAppSlotSiteConfig.class}, tree="[0]") private Output siteConfig; /** * @return a `site_config` block as detailed below. * */ public Output siteConfig() { return this.siteConfig; } /** * A `site_credential` block as defined below. * */ @Export(name="siteCredentials", refs={List.class,WindowsFunctionAppSlotSiteCredential.class}, tree="[0,1]") private Output> siteCredentials; /** * @return A `site_credential` block as defined below. * */ public Output> siteCredentials() { return this.siteCredentials; } /** * The access key which will be used to access the storage account for the Function App Slot. * */ @Export(name="storageAccountAccessKey", refs={String.class}, tree="[0]") private Output storageAccountAccessKey; /** * @return The access key which will be used to access the storage account for the Function App Slot. * */ public Output> storageAccountAccessKey() { return Codegen.optional(this.storageAccountAccessKey); } /** * The backend storage account name which will be used by this Function App Slot. * */ @Export(name="storageAccountName", refs={String.class}, tree="[0]") private Output storageAccountName; /** * @return The backend storage account name which will be used by this Function App Slot. * */ public Output> storageAccountName() { return Codegen.optional(this.storageAccountName); } /** * One or more `storage_account` blocks as defined below. * */ @Export(name="storageAccounts", refs={List.class,WindowsFunctionAppSlotStorageAccount.class}, tree="[0,1]") private Output> storageAccounts; /** * @return One or more `storage_account` blocks as defined below. * */ public Output>> storageAccounts() { return Codegen.optional(this.storageAccounts); } /** * The Key Vault Secret ID, optionally including version, that contains the Connection String to connect to the storage account for this Function App Slot. * * > **NOTE:** `storage_key_vault_secret_id` cannot be used with `storage_account_name`. * * > **NOTE:** `storage_key_vault_secret_id` used without a version will use the latest version of the secret, however, the service can take up to 24h to pick up a rotation of the latest version. See the [official docs](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#rotation) for more information. * */ @Export(name="storageKeyVaultSecretId", refs={String.class}, tree="[0]") private Output storageKeyVaultSecretId; /** * @return The Key Vault Secret ID, optionally including version, that contains the Connection String to connect to the storage account for this Function App Slot. * * > **NOTE:** `storage_key_vault_secret_id` cannot be used with `storage_account_name`. * * > **NOTE:** `storage_key_vault_secret_id` used without a version will use the latest version of the secret, however, the service can take up to 24h to pick up a rotation of the latest version. See the [official docs](https://docs.microsoft.com/azure/app-service/app-service-key-vault-references#rotation) for more information. * */ public Output> storageKeyVaultSecretId() { return Codegen.optional(this.storageKeyVaultSecretId); } /** * Should the Function App Slot use its Managed Identity to access storage. * * > **NOTE:** One of `storage_account_access_key` or `storage_uses_managed_identity` must be specified when using `storage_account_name`. * */ @Export(name="storageUsesManagedIdentity", refs={Boolean.class}, tree="[0]") private Output storageUsesManagedIdentity; /** * @return Should the Function App Slot use its Managed Identity to access storage. * * > **NOTE:** One of `storage_account_access_key` or `storage_uses_managed_identity` must be specified when using `storage_account_name`. * */ public Output> storageUsesManagedIdentity() { return Codegen.optional(this.storageUsesManagedIdentity); } /** * A mapping of tags which should be assigned to the Windows Function App Slot. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return A mapping of tags which should be assigned to the Windows Function App Slot. * */ public Output>> tags() { return Codegen.optional(this.tags); } @Export(name="virtualNetworkSubnetId", refs={String.class}, tree="[0]") private Output virtualNetworkSubnetId; public Output> virtualNetworkSubnetId() { return Codegen.optional(this.virtualNetworkSubnetId); } /** * Is container image pull over virtual network enabled? Defaults to `false`. * */ @Export(name="vnetImagePullEnabled", refs={Boolean.class}, tree="[0]") private Output vnetImagePullEnabled; /** * @return Is container image pull over virtual network enabled? Defaults to `false`. * */ public Output> vnetImagePullEnabled() { return Codegen.optional(this.vnetImagePullEnabled); } /** * Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to `true`. * */ @Export(name="webdeployPublishBasicAuthenticationEnabled", refs={Boolean.class}, tree="[0]") private Output webdeployPublishBasicAuthenticationEnabled; /** * @return Should the default WebDeploy Basic Authentication publishing credentials enabled. Defaults to `true`. * */ public Output> webdeployPublishBasicAuthenticationEnabled() { return Codegen.optional(this.webdeployPublishBasicAuthenticationEnabled); } /** * * @param name The _unique_ name of the resulting resource. */ public WindowsFunctionAppSlot(java.lang.String name) { this(name, WindowsFunctionAppSlotArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public WindowsFunctionAppSlot(java.lang.String name, WindowsFunctionAppSlotArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public WindowsFunctionAppSlot(java.lang.String name, WindowsFunctionAppSlotArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:appservice/windowsFunctionAppSlot:WindowsFunctionAppSlot", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private WindowsFunctionAppSlot(java.lang.String name, Output id, @Nullable WindowsFunctionAppSlotState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:appservice/windowsFunctionAppSlot:WindowsFunctionAppSlot", name, state, makeResourceOptions(options, id), false); } private static WindowsFunctionAppSlotArgs makeArgs(WindowsFunctionAppSlotArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? WindowsFunctionAppSlotArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .additionalSecretOutputs(List.of( "customDomainVerificationId", "siteCredentials", "storageAccountAccessKey" )) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static WindowsFunctionAppSlot get(java.lang.String name, Output id, @Nullable WindowsFunctionAppSlotState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new WindowsFunctionAppSlot(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy