Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.logicapps.Standard Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.
// *** 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.logicapps;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.logicapps.StandardArgs;
import com.pulumi.azure.logicapps.inputs.StandardState;
import com.pulumi.azure.logicapps.outputs.StandardConnectionString;
import com.pulumi.azure.logicapps.outputs.StandardIdentity;
import com.pulumi.azure.logicapps.outputs.StandardSiteConfig;
import com.pulumi.azure.logicapps.outputs.StandardSiteCredential;
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;
/**
* Manages a Logic App (Standard / Single Tenant)
*
* ## Example Usage
*
* ### With App Service Plan)
*
* <!--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.Plan;
* import com.pulumi.azure.appservice.PlanArgs;
* import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
* import com.pulumi.azure.logicapps.Standard;
* import com.pulumi.azure.logicapps.StandardArgs;
* 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("azure-functions-test-rg")
* .location("West Europe")
* .build());
*
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("functionsapptestsa")
* .resourceGroupName(example.name())
* .location(example.location())
* .accountTier("Standard")
* .accountReplicationType("LRS")
* .build());
*
* var examplePlan = new Plan("examplePlan", PlanArgs.builder()
* .name("azure-functions-test-service-plan")
* .location(example.location())
* .resourceGroupName(example.name())
* .kind("elastic")
* .sku(PlanSkuArgs.builder()
* .tier("WorkflowStandard")
* .size("WS1")
* .build())
* .build());
*
* var exampleStandard = new Standard("exampleStandard", StandardArgs.builder()
* .name("test-azure-functions")
* .location(example.location())
* .resourceGroupName(example.name())
* .appServicePlanId(examplePlan.id())
* .storageAccountName(exampleAccount.name())
* .storageAccountAccessKey(exampleAccount.primaryAccessKey())
* .appSettings(Map.ofEntries(
* Map.entry("FUNCTIONS_WORKER_RUNTIME", "node"),
* Map.entry("WEBSITE_NODE_DEFAULT_VERSION", "~18")
* ))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ### For Container Mode)
*
* > **Note:** You must set `azure.appservice.Plan` `kind` to `Linux` and `reserved` to `true` when used with `linux_fx_version`
*
* <!--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.Plan;
* import com.pulumi.azure.appservice.PlanArgs;
* import com.pulumi.azure.appservice.inputs.PlanSkuArgs;
* import com.pulumi.azure.logicapps.Standard;
* import com.pulumi.azure.logicapps.StandardArgs;
* import com.pulumi.azure.logicapps.inputs.StandardSiteConfigArgs;
* 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("azure-functions-test-rg")
* .location("West Europe")
* .build());
*
* var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
* .name("functionsapptestsa")
* .resourceGroupName(example.name())
* .location(example.location())
* .accountTier("Standard")
* .accountReplicationType("LRS")
* .build());
*
* var examplePlan = new Plan("examplePlan", PlanArgs.builder()
* .name("azure-functions-test-service-plan")
* .location(example.location())
* .resourceGroupName(example.name())
* .kind("Linux")
* .reserved(true)
* .sku(PlanSkuArgs.builder()
* .tier("WorkflowStandard")
* .size("WS1")
* .build())
* .build());
*
* var exampleStandard = new Standard("exampleStandard", StandardArgs.builder()
* .name("test-azure-functions")
* .location(example.location())
* .resourceGroupName(example.name())
* .appServicePlanId(examplePlan.id())
* .storageAccountName(exampleAccount.name())
* .storageAccountAccessKey(exampleAccount.primaryAccessKey())
* .siteConfig(StandardSiteConfigArgs.builder()
* .linuxFxVersion("DOCKER|mcr.microsoft.com/azure-functions/dotnet:3.0-appservice")
* .build())
* .appSettings(Map.ofEntries(
* Map.entry("DOCKER_REGISTRY_SERVER_URL", "https://.azurecr.io"),
* Map.entry("DOCKER_REGISTRY_SERVER_USERNAME", "username"),
* Map.entry("DOCKER_REGISTRY_SERVER_PASSWORD", "password")
* ))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Logic Apps can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:logicapps/standard:Standard logicapp1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Web/sites/logicapp1
* ```
*
*/
@ResourceType(type="azure:logicapps/standard:Standard")
public class Standard extends com.pulumi.resources.CustomResource {
/**
* The ID of the App Service Plan within which to create this Logic App
*
*/
@Export(name="appServicePlanId", refs={String.class}, tree="[0]")
private Output appServicePlanId;
/**
* @return The ID of the App Service Plan within which to create this Logic App
*
*/
public Output appServicePlanId() {
return this.appServicePlanId;
}
/**
* A map of key-value pairs for [App Settings](https://docs.microsoft.com/azure/azure-functions/functions-app-settings) and custom values.
*
* > **NOTE:** There are a number of application settings that will be managed for you by this resource type and *shouldn't* be configured separately as part of the app_settings you specify. `AzureWebJobsStorage` is filled based on `storage_account_name` and `storage_account_access_key`. `WEBSITE_CONTENTSHARE` is detailed below. `FUNCTIONS_EXTENSION_VERSION` is filled based on `version`. `APP_KIND` is set to workflowApp and `AzureFunctionsJobHost__extensionBundle__id` and `AzureFunctionsJobHost__extensionBundle__version` are set as detailed below.
*
*/
@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.
*
* > **NOTE:** There are a number of application settings that will be managed for you by this resource type and *shouldn't* be configured separately as part of the app_settings you specify. `AzureWebJobsStorage` is filled based on `storage_account_name` and `storage_account_access_key`. `WEBSITE_CONTENTSHARE` is detailed below. `FUNCTIONS_EXTENSION_VERSION` is filled based on `version`. `APP_KIND` is set to workflowApp and `AzureFunctionsJobHost__extensionBundle__id` and `AzureFunctionsJobHost__extensionBundle__version` are set as detailed below.
*
*/
public Output> appSettings() {
return this.appSettings;
}
/**
* If `use_extension_bundle` then controls the allowed range for bundle versions. Defaults to `[1.*, 2.0.0)`.
*
*/
@Export(name="bundleVersion", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> bundleVersion;
/**
* @return If `use_extension_bundle` then controls the allowed range for bundle versions. Defaults to `[1.*, 2.0.0)`.
*
*/
public Output> bundleVersion() {
return Codegen.optional(this.bundleVersion);
}
/**
* Should the Logic App send session affinity cookies, which route client requests in the same session to the same instance?
*
*/
@Export(name="clientAffinityEnabled", refs={Boolean.class}, tree="[0]")
private Output clientAffinityEnabled;
/**
* @return Should the Logic App send session affinity cookies, which route client requests in the same session to the same instance?
*
*/
public Output clientAffinityEnabled() {
return this.clientAffinityEnabled;
}
/**
* The mode of the Logic App's client certificates requirement for incoming requests. Possible values are `Required` and `Optional`.
*
*/
@Export(name="clientCertificateMode", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> clientCertificateMode;
/**
* @return The mode of the Logic App's client certificates requirement for incoming requests. Possible values are `Required` and `Optional`.
*
*/
public Output> clientCertificateMode() {
return Codegen.optional(this.clientCertificateMode);
}
/**
* An `connection_string` block as defined below.
*
*/
@Export(name="connectionStrings", refs={List.class,StandardConnectionString.class}, tree="[0,1]")
private Output> connectionStrings;
/**
* @return An `connection_string` block as defined below.
*
*/
public Output> connectionStrings() {
return this.connectionStrings;
}
/**
* An 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 An identifier used by App Service to perform domain ownership verification via DNS TXT record.
*
*/
public Output customDomainVerificationId() {
return this.customDomainVerificationId;
}
/**
* The default hostname associated with the Logic App - such as `mysite.azurewebsites.net`
*
*/
@Export(name="defaultHostname", refs={String.class}, tree="[0]")
private Output defaultHostname;
/**
* @return The default hostname associated with the Logic App - such as `mysite.azurewebsites.net`
*
*/
public Output defaultHostname() {
return this.defaultHostname;
}
/**
* Is the Logic App enabled? Defaults to `true`.
*
*/
@Export(name="enabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> enabled;
/**
* @return Is the Logic App enabled? Defaults to `true`.
*
*/
public Output> enabled() {
return Codegen.optional(this.enabled);
}
/**
* Can the Logic App only be accessed via HTTPS? Defaults to `false`.
*
*/
@Export(name="httpsOnly", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> httpsOnly;
/**
* @return Can the Logic App only be accessed via HTTPS? Defaults to `false`.
*
*/
public Output> httpsOnly() {
return Codegen.optional(this.httpsOnly);
}
/**
* An `identity` block as defined below.
*
*/
@Export(name="identity", refs={StandardIdentity.class}, tree="[0]")
private Output* @Nullable */ StandardIdentity> identity;
/**
* @return An `identity` block as defined below.
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* The Logic App kind - will be `functionapp,workflowapp`
*
*/
@Export(name="kind", refs={String.class}, tree="[0]")
private Output kind;
/**
* @return The Logic App kind - will be `functionapp,workflowapp`
*
*/
public Output kind() {
return this.kind;
}
/**
* Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
*
*/
public Output location() {
return this.location;
}
/**
* Specifies the name of the Logic App 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 Logic App Changing this forces a new resource to be created.
*
*/
public Output name() {
return this.name;
}
/**
* A comma separated list of outbound IP addresses - such as `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 - such as `52.23.25.3,52.143.43.12`
*
*/
public Output outboundIpAddresses() {
return this.outboundIpAddresses;
}
/**
* A comma separated list of outbound IP addresses - such as `52.23.25.3,52.143.43.12,52.143.43.17` - not all of which are necessarily in use. Superset of `outbound_ip_addresses`.
*
*/
@Export(name="possibleOutboundIpAddresses", refs={String.class}, tree="[0]")
private Output possibleOutboundIpAddresses;
/**
* @return A comma separated list of outbound IP addresses - such as `52.23.25.3,52.143.43.12,52.143.43.17` - not all of which are necessarily in use. Superset of `outbound_ip_addresses`.
*
*/
public Output possibleOutboundIpAddresses() {
return this.possibleOutboundIpAddresses;
}
/**
* The name of the resource group in which to create the Logic App. Changing this forces a new resource to be created.
*
*/
@Export(name="resourceGroupName", refs={String.class}, tree="[0]")
private Output resourceGroupName;
/**
* @return The name of the resource group in which to create the Logic App. Changing this forces a new resource to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* A `site_config` object as defined below.
*
*/
@Export(name="siteConfig", refs={StandardSiteConfig.class}, tree="[0]")
private Output siteConfig;
/**
* @return A `site_config` object as defined below.
*
*/
public Output siteConfig() {
return this.siteConfig;
}
/**
* A `site_credential` block as defined below, which contains the site-level credentials used to publish to this App Service.
*
*/
@Export(name="siteCredentials", refs={List.class,StandardSiteCredential.class}, tree="[0,1]")
private Output> siteCredentials;
/**
* @return A `site_credential` block as defined below, which contains the site-level credentials used to publish to this App Service.
*
*/
public Output> siteCredentials() {
return this.siteCredentials;
}
/**
* The access key which will be used to access the backend storage account for the Logic App
*
*/
@Export(name="storageAccountAccessKey", refs={String.class}, tree="[0]")
private Output storageAccountAccessKey;
/**
* @return The access key which will be used to access the backend storage account for the Logic App
*
*/
public Output storageAccountAccessKey() {
return this.storageAccountAccessKey;
}
/**
* The backend storage account name which will be used by this Logic App (e.g. for Stateful workflows data). Changing this forces a new resource to be created.
*
*/
@Export(name="storageAccountName", refs={String.class}, tree="[0]")
private Output storageAccountName;
/**
* @return The backend storage account name which will be used by this Logic App (e.g. for Stateful workflows data). Changing this forces a new resource to be created.
*
*/
public Output storageAccountName() {
return this.storageAccountName;
}
@Export(name="storageAccountShareName", refs={String.class}, tree="[0]")
private Output storageAccountShareName;
public Output storageAccountShareName() {
return this.storageAccountShareName;
}
/**
* A mapping of tags to assign to the resource.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return A mapping of tags to assign to the resource.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
* Should the logic app use the bundled extension package? If true, then application settings for `AzureFunctionsJobHost__extensionBundle__id` and `AzureFunctionsJobHost__extensionBundle__version` will be created. Defaults to `true`.
*
*/
@Export(name="useExtensionBundle", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> useExtensionBundle;
/**
* @return Should the logic app use the bundled extension package? If true, then application settings for `AzureFunctionsJobHost__extensionBundle__id` and `AzureFunctionsJobHost__extensionBundle__version` will be created. Defaults to `true`.
*
*/
public Output> useExtensionBundle() {
return Codegen.optional(this.useExtensionBundle);
}
/**
* The runtime version associated with the Logic App. Defaults to `~4`.
*
* > **Note:** Logic App version `3.x` will be out of support from December 3 2022. For more details refer [Logic Apps Standard Support for Functions Runtime V4](https://azure.microsoft.com/en-us/updates/logic-apps-standard-support-for-functions-runtime-v4/)
*
*/
@Export(name="version", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> version;
/**
* @return The runtime version associated with the Logic App. Defaults to `~4`.
*
* > **Note:** Logic App version `3.x` will be out of support from December 3 2022. For more details refer [Logic Apps Standard Support for Functions Runtime V4](https://azure.microsoft.com/en-us/updates/logic-apps-standard-support-for-functions-runtime-v4/)
*
*/
public Output> version() {
return Codegen.optional(this.version);
}
@Export(name="virtualNetworkSubnetId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> virtualNetworkSubnetId;
public Output> virtualNetworkSubnetId() {
return Codegen.optional(this.virtualNetworkSubnetId);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public Standard(java.lang.String name) {
this(name, StandardArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public Standard(java.lang.String name, StandardArgs 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 Standard(java.lang.String name, StandardArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:logicapps/standard:Standard", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private Standard(java.lang.String name, Output id, @Nullable StandardState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:logicapps/standard:Standard", name, state, makeResourceOptions(options, id), false);
}
private static StandardArgs makeArgs(StandardArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? StandardArgs.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(
"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 Standard get(java.lang.String name, Output id, @Nullable StandardState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new Standard(name, id, state, options);
}
}