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

com.pulumi.azurenative.web.StaticSite Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.azurenative.web;

import com.pulumi.azurenative.Utilities;
import com.pulumi.azurenative.web.StaticSiteArgs;
import com.pulumi.azurenative.web.outputs.DatabaseConnectionOverviewResponse;
import com.pulumi.azurenative.web.outputs.ManagedServiceIdentityResponse;
import com.pulumi.azurenative.web.outputs.ResponseMessageEnvelopeRemotePrivateEndpointConnectionResponse;
import com.pulumi.azurenative.web.outputs.SkuDescriptionResponse;
import com.pulumi.azurenative.web.outputs.StaticSiteBuildPropertiesResponse;
import com.pulumi.azurenative.web.outputs.StaticSiteLinkedBackendResponse;
import com.pulumi.azurenative.web.outputs.StaticSiteTemplateOptionsResponse;
import com.pulumi.azurenative.web.outputs.StaticSiteUserProvidedFunctionAppResponse;
import com.pulumi.core.Alias;
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.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Static Site ARM resource.
 * Azure REST API version: 2022-09-01. Prior API version in Azure Native 1.x: 2020-12-01.
 * 
 * Other available API versions: 2020-10-01, 2021-02-01, 2023-01-01, 2023-12-01, 2024-04-01.
 * 
 * ## Example Usage
 * ### Create or update a static site
 * 
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.web.StaticSite;
 * import com.pulumi.azurenative.web.StaticSiteArgs;
 * import com.pulumi.azurenative.web.inputs.StaticSiteBuildPropertiesArgs;
 * import com.pulumi.azurenative.web.inputs.SkuDescriptionArgs;
 * 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 staticSite = new StaticSite("staticSite", StaticSiteArgs.builder()
 *             .branch("master")
 *             .buildProperties(StaticSiteBuildPropertiesArgs.builder()
 *                 .apiLocation("api")
 *                 .appArtifactLocation("build")
 *                 .appLocation("app")
 *                 .build())
 *             .location("West US 2")
 *             .name("testStaticSite0")
 *             .repositoryToken("repoToken123")
 *             .repositoryUrl("https://github.com/username/RepoName")
 *             .resourceGroupName("rg")
 *             .sku(SkuDescriptionArgs.builder()
 *                 .name("Basic")
 *                 .tier("Basic")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * 
 * }
 * 
* * ## Import * * An existing resource can be imported using its type token, name, and identifier, e.g. * * ```sh * $ pulumi import azure-native:web:StaticSite testStaticSite0 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/staticSites/{name} * ``` * */ @ResourceType(type="azure-native:web:StaticSite") public class StaticSite extends com.pulumi.resources.CustomResource { /** * <code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>. * */ @Export(name="allowConfigFileUpdates", refs={Boolean.class}, tree="[0]") private Output allowConfigFileUpdates; /** * @return <code>false</code> if config file is locked for this static web app; otherwise, <code>true</code>. * */ public Output> allowConfigFileUpdates() { return Codegen.optional(this.allowConfigFileUpdates); } /** * The target branch in the repository. * */ @Export(name="branch", refs={String.class}, tree="[0]") private Output branch; /** * @return The target branch in the repository. * */ public Output> branch() { return Codegen.optional(this.branch); } /** * Build properties to configure on the repository. * */ @Export(name="buildProperties", refs={StaticSiteBuildPropertiesResponse.class}, tree="[0]") private Output buildProperties; /** * @return Build properties to configure on the repository. * */ public Output> buildProperties() { return Codegen.optional(this.buildProperties); } /** * The content distribution endpoint for the static site. * */ @Export(name="contentDistributionEndpoint", refs={String.class}, tree="[0]") private Output contentDistributionEndpoint; /** * @return The content distribution endpoint for the static site. * */ public Output contentDistributionEndpoint() { return this.contentDistributionEndpoint; } /** * The custom domains associated with this static site. * */ @Export(name="customDomains", refs={List.class,String.class}, tree="[0,1]") private Output> customDomains; /** * @return The custom domains associated with this static site. * */ public Output> customDomains() { return this.customDomains; } /** * Database connections for the static site * */ @Export(name="databaseConnections", refs={List.class,DatabaseConnectionOverviewResponse.class}, tree="[0,1]") private Output> databaseConnections; /** * @return Database connections for the static site * */ public Output> databaseConnections() { return this.databaseConnections; } /** * The default autogenerated hostname for the static site. * */ @Export(name="defaultHostname", refs={String.class}, tree="[0]") private Output defaultHostname; /** * @return The default autogenerated hostname for the static site. * */ public Output defaultHostname() { return this.defaultHostname; } /** * State indicating the status of the enterprise grade CDN serving traffic to the static web app. * */ @Export(name="enterpriseGradeCdnStatus", refs={String.class}, tree="[0]") private Output enterpriseGradeCdnStatus; /** * @return State indicating the status of the enterprise grade CDN serving traffic to the static web app. * */ public Output> enterpriseGradeCdnStatus() { return Codegen.optional(this.enterpriseGradeCdnStatus); } /** * Managed service identity. * */ @Export(name="identity", refs={ManagedServiceIdentityResponse.class}, tree="[0]") private Output identity; /** * @return Managed service identity. * */ public Output> identity() { return Codegen.optional(this.identity); } /** * Identity to use for Key Vault Reference authentication. * */ @Export(name="keyVaultReferenceIdentity", refs={String.class}, tree="[0]") private Output keyVaultReferenceIdentity; /** * @return Identity to use for Key Vault Reference authentication. * */ public Output keyVaultReferenceIdentity() { return this.keyVaultReferenceIdentity; } /** * Kind of resource. * */ @Export(name="kind", refs={String.class}, tree="[0]") private Output kind; /** * @return Kind of resource. * */ public Output> kind() { return Codegen.optional(this.kind); } /** * Backends linked to the static side * */ @Export(name="linkedBackends", refs={List.class,StaticSiteLinkedBackendResponse.class}, tree="[0,1]") private Output> linkedBackends; /** * @return Backends linked to the static side * */ public Output> linkedBackends() { return this.linkedBackends; } /** * Resource Location. * */ @Export(name="location", refs={String.class}, tree="[0]") private Output location; /** * @return Resource Location. * */ public Output location() { return this.location; } /** * Resource Name. * */ @Export(name="name", refs={String.class}, tree="[0]") private Output name; /** * @return Resource Name. * */ public Output name() { return this.name; } /** * Private endpoint connections * */ @Export(name="privateEndpointConnections", refs={List.class,ResponseMessageEnvelopeRemotePrivateEndpointConnectionResponse.class}, tree="[0,1]") private Output> privateEndpointConnections; /** * @return Private endpoint connections * */ public Output> privateEndpointConnections() { return this.privateEndpointConnections; } /** * The provider that submitted the last deployment to the primary environment of the static site. * */ @Export(name="provider", refs={String.class}, tree="[0]") private Output provider; /** * @return The provider that submitted the last deployment to the primary environment of the static site. * */ public Output> provider() { return Codegen.optional(this.provider); } /** * State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. * */ @Export(name="publicNetworkAccess", refs={String.class}, tree="[0]") private Output publicNetworkAccess; /** * @return State indicating whether public traffic are allowed or not for a static web app. Allowed Values: 'Enabled', 'Disabled' or an empty string. * */ public Output> publicNetworkAccess() { return Codegen.optional(this.publicNetworkAccess); } /** * A user's github repository token. This is used to setup the Github Actions workflow file and API secrets. * */ @Export(name="repositoryToken", refs={String.class}, tree="[0]") private Output repositoryToken; /** * @return A user's github repository token. This is used to setup the Github Actions workflow file and API secrets. * */ public Output> repositoryToken() { return Codegen.optional(this.repositoryToken); } /** * URL for the repository of the static site. * */ @Export(name="repositoryUrl", refs={String.class}, tree="[0]") private Output repositoryUrl; /** * @return URL for the repository of the static site. * */ public Output> repositoryUrl() { return Codegen.optional(this.repositoryUrl); } /** * Description of a SKU for a scalable resource. * */ @Export(name="sku", refs={SkuDescriptionResponse.class}, tree="[0]") private Output sku; /** * @return Description of a SKU for a scalable resource. * */ public Output> sku() { return Codegen.optional(this.sku); } /** * State indicating whether staging environments are allowed or not allowed for a static web app. * */ @Export(name="stagingEnvironmentPolicy", refs={String.class}, tree="[0]") private Output stagingEnvironmentPolicy; /** * @return State indicating whether staging environments are allowed or not allowed for a static web app. * */ public Output> stagingEnvironmentPolicy() { return Codegen.optional(this.stagingEnvironmentPolicy); } /** * Resource tags. * */ @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]") private Output> tags; /** * @return Resource tags. * */ public Output>> tags() { return Codegen.optional(this.tags); } /** * Template options for generating a new repository. * */ @Export(name="templateProperties", refs={StaticSiteTemplateOptionsResponse.class}, tree="[0]") private Output templateProperties; /** * @return Template options for generating a new repository. * */ public Output> templateProperties() { return Codegen.optional(this.templateProperties); } /** * Resource type. * */ @Export(name="type", refs={String.class}, tree="[0]") private Output type; /** * @return Resource type. * */ public Output type() { return this.type; } /** * User provided function apps registered with the static site * */ @Export(name="userProvidedFunctionApps", refs={List.class,StaticSiteUserProvidedFunctionAppResponse.class}, tree="[0,1]") private Output> userProvidedFunctionApps; /** * @return User provided function apps registered with the static site * */ public Output> userProvidedFunctionApps() { return this.userProvidedFunctionApps; } /** * * @param name The _unique_ name of the resulting resource. */ public StaticSite(java.lang.String name) { this(name, StaticSiteArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public StaticSite(java.lang.String name, StaticSiteArgs 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 StaticSite(java.lang.String name, StaticSiteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:web:StaticSite", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private StaticSite(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure-native:web:StaticSite", name, null, makeResourceOptions(options, id), false); } private static StaticSiteArgs makeArgs(StaticSiteArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? StaticSiteArgs.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()) .aliases(List.of( Output.of(Alias.builder().type("azure-native:web/v20190801:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20200601:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20200901:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20201001:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20201201:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20210101:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20210115:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20210201:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20210301:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20220301:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20220901:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20230101:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20231201:StaticSite").build()), Output.of(Alias.builder().type("azure-native:web/v20240401:StaticSite").build()) )) .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 options Optional settings to control the behavior of the CustomResource. */ public static StaticSite get(java.lang.String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new StaticSite(name, id, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy