com.pulumi.azure.bot.ServiceAzureBot Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
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.bot;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.bot.ServiceAzureBotArgs;
import com.pulumi.azure.bot.inputs.ServiceAzureBotState;
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 an Azure Bot Service.
*
* ## 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.appinsights.Insights;
* import com.pulumi.azure.appinsights.InsightsArgs;
* import com.pulumi.azure.appinsights.ApiKey;
* import com.pulumi.azure.appinsights.ApiKeyArgs;
* import com.pulumi.azure.core.CoreFunctions;
* import com.pulumi.azure.bot.ServiceAzureBot;
* import com.pulumi.azure.bot.ServiceAzureBotArgs;
* 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 exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
* .name("example-appinsights")
* .location(example.location())
* .resourceGroupName(example.name())
* .applicationType("web")
* .build());
*
* var exampleApiKey = new ApiKey("exampleApiKey", ApiKeyArgs.builder()
* .name("example-appinsightsapikey")
* .applicationInsightsId(exampleInsights.id())
* .readPermissions(
* "aggregate",
* "api",
* "draft",
* "extendqueries",
* "search")
* .build());
*
* final var current = CoreFunctions.getClientConfig();
*
* var exampleServiceAzureBot = new ServiceAzureBot("exampleServiceAzureBot", ServiceAzureBotArgs.builder()
* .name("exampleazurebot")
* .resourceGroupName(example.name())
* .location("global")
* .microsoftAppId(current.applyValue(getClientConfigResult -> getClientConfigResult.clientId()))
* .sku("F0")
* .endpoint("https://example.com")
* .developerAppInsightsApiKey(exampleApiKey.apiKey())
* .developerAppInsightsApplicationId(exampleInsights.appId())
* .tags(Map.of("environment", "test"))
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Azure Bot Services can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:bot/serviceAzureBot:ServiceAzureBot example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/resGroup1/providers/Microsoft.BotService/botServices/botService1
* ```
*
*/
@ResourceType(type="azure:bot/serviceAzureBot:ServiceAzureBot")
public class ServiceAzureBot extends com.pulumi.resources.CustomResource {
/**
* The CMK Key Vault Key URL that will be used to encrypt the Bot with the Customer Managed Encryption Key.
*
* > **Note:** In order to utilize CMEK, you must add the `Key Vault Crypto Service Encryption User` role to the Azure-defined `Bot Service CMEK Prod` Service Principal. You must also enable `soft_delete_enabled` and `purge_protection_enabled` on the `azure.keyvault.KeyVault` that `cmk_key_vault_key_url` refers to. [See Azure Documentation](https://learn.microsoft.com/en-us/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0#how-to-configure-your-azure-key-vault-instance)
*
*/
@Export(name="cmkKeyVaultKeyUrl", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> cmkKeyVaultKeyUrl;
/**
* @return The CMK Key Vault Key URL that will be used to encrypt the Bot with the Customer Managed Encryption Key.
*
* > **Note:** In order to utilize CMEK, you must add the `Key Vault Crypto Service Encryption User` role to the Azure-defined `Bot Service CMEK Prod` Service Principal. You must also enable `soft_delete_enabled` and `purge_protection_enabled` on the `azure.keyvault.KeyVault` that `cmk_key_vault_key_url` refers to. [See Azure Documentation](https://learn.microsoft.com/en-us/azure/bot-service/bot-service-encryption?view=azure-bot-service-4.0#how-to-configure-your-azure-key-vault-instance)
*
*/
public Output> cmkKeyVaultKeyUrl() {
return Codegen.optional(this.cmkKeyVaultKeyUrl);
}
/**
* The Application Insights API Key to associate with this Azure Bot Service.
*
*/
@Export(name="developerAppInsightsApiKey", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> developerAppInsightsApiKey;
/**
* @return The Application Insights API Key to associate with this Azure Bot Service.
*
*/
public Output> developerAppInsightsApiKey() {
return Codegen.optional(this.developerAppInsightsApiKey);
}
/**
* The resource ID of the Application Insights instance to associate with this Azure Bot Service.
*
*/
@Export(name="developerAppInsightsApplicationId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> developerAppInsightsApplicationId;
/**
* @return The resource ID of the Application Insights instance to associate with this Azure Bot Service.
*
*/
public Output> developerAppInsightsApplicationId() {
return Codegen.optional(this.developerAppInsightsApplicationId);
}
/**
* The Application Insight Key to associate with this Azure Bot Service.
*
*/
@Export(name="developerAppInsightsKey", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> developerAppInsightsKey;
/**
* @return The Application Insight Key to associate with this Azure Bot Service.
*
*/
public Output> developerAppInsightsKey() {
return Codegen.optional(this.developerAppInsightsKey);
}
/**
* The name that the Azure Bot Service will be displayed as. This defaults to the value set for `name` if not specified.
*
*/
@Export(name="displayName", refs={String.class}, tree="[0]")
private Output displayName;
/**
* @return The name that the Azure Bot Service will be displayed as. This defaults to the value set for `name` if not specified.
*
*/
public Output displayName() {
return this.displayName;
}
/**
* The Azure Bot Service endpoint.
*
*/
@Export(name="endpoint", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> endpoint;
/**
* @return The Azure Bot Service endpoint.
*
*/
public Output> endpoint() {
return Codegen.optional(this.endpoint);
}
/**
* The Icon Url of the Azure Bot Service. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
*
*/
@Export(name="iconUrl", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> iconUrl;
/**
* @return The Icon Url of the Azure Bot Service. Defaults to `https://docs.botframework.com/static/devportal/client/images/bot-framework-default.png`.
*
*/
public Output> iconUrl() {
return Codegen.optional(this.iconUrl);
}
/**
* Is local authentication enabled? Defaults to `true`.
*
*/
@Export(name="localAuthenticationEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> localAuthenticationEnabled;
/**
* @return Is local authentication enabled? Defaults to `true`.
*
*/
public Output> localAuthenticationEnabled() {
return Codegen.optional(this.localAuthenticationEnabled);
}
/**
* The supported Azure location where the Azure Bot Service should exist. Changing this forces a new resource to be created.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The supported Azure location where the Azure Bot Service should exist. Changing this forces a new resource to be created.
*
*/
public Output location() {
return this.location;
}
/**
* A list of LUIS App IDs to associate with this Azure Bot Service.
*
*/
@Export(name="luisAppIds", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> luisAppIds;
/**
* @return A list of LUIS App IDs to associate with this Azure Bot Service.
*
*/
public Output>> luisAppIds() {
return Codegen.optional(this.luisAppIds);
}
/**
* The LUIS key to associate with this Azure Bot Service.
*
*/
@Export(name="luisKey", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> luisKey;
/**
* @return The LUIS key to associate with this Azure Bot Service.
*
*/
public Output> luisKey() {
return Codegen.optional(this.luisKey);
}
/**
* The Microsoft Application ID for the Azure Bot Service. Changing this forces a new resource to be created.
*
*/
@Export(name="microsoftAppId", refs={String.class}, tree="[0]")
private Output microsoftAppId;
/**
* @return The Microsoft Application ID for the Azure Bot Service. Changing this forces a new resource to be created.
*
*/
public Output microsoftAppId() {
return this.microsoftAppId;
}
/**
* The ID of the Microsoft App Managed Identity for this Azure Bot Service. Changing this forces a new resource to be created.
*
*/
@Export(name="microsoftAppMsiId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> microsoftAppMsiId;
/**
* @return The ID of the Microsoft App Managed Identity for this Azure Bot Service. Changing this forces a new resource to be created.
*
*/
public Output> microsoftAppMsiId() {
return Codegen.optional(this.microsoftAppMsiId);
}
/**
* The Tenant ID of the Microsoft App for this Azure Bot Service. Changing this forces a new resource to be created.
*
*/
@Export(name="microsoftAppTenantId", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> microsoftAppTenantId;
/**
* @return The Tenant ID of the Microsoft App for this Azure Bot Service. Changing this forces a new resource to be created.
*
*/
public Output> microsoftAppTenantId() {
return Codegen.optional(this.microsoftAppTenantId);
}
/**
* The Microsoft App Type for this Azure Bot Service. Possible values are `MultiTenant`, `SingleTenant` and `UserAssignedMSI`. Changing this forces a new resource to be created.
*
*/
@Export(name="microsoftAppType", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> microsoftAppType;
/**
* @return The Microsoft App Type for this Azure Bot Service. Possible values are `MultiTenant`, `SingleTenant` and `UserAssignedMSI`. Changing this forces a new resource to be created.
*
*/
public Output> microsoftAppType() {
return Codegen.optional(this.microsoftAppType);
}
/**
* The name which should be used for this Azure Bot Service. Changing this forces a new resource to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name which should be used for this Azure Bot Service. Changing this forces a new resource to be created.
*
*/
public Output name() {
return this.name;
}
/**
* Whether public network access is enabled. Defaults to `true`.
*
*/
@Export(name="publicNetworkAccessEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> publicNetworkAccessEnabled;
/**
* @return Whether public network access is enabled. Defaults to `true`.
*
*/
public Output> publicNetworkAccessEnabled() {
return Codegen.optional(this.publicNetworkAccessEnabled);
}
/**
* The name of the Resource Group where the Azure Bot Service should exist. 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 where the Azure Bot Service should exist. Changing this forces a new resource to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* The SKU of the Azure Bot Service. Accepted values are `F0` or `S1`. Changing this forces a new resource to be created.
*
*/
@Export(name="sku", refs={String.class}, tree="[0]")
private Output sku;
/**
* @return The SKU of the Azure Bot Service. Accepted values are `F0` or `S1`. Changing this forces a new resource to be created.
*
*/
public Output sku() {
return this.sku;
}
/**
* Is the streaming endpoint enabled for this Azure Bot Service. Defaults to `false`.
*
*/
@Export(name="streamingEndpointEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> streamingEndpointEnabled;
/**
* @return Is the streaming endpoint enabled for this Azure Bot Service. Defaults to `false`.
*
*/
public Output> streamingEndpointEnabled() {
return Codegen.optional(this.streamingEndpointEnabled);
}
/**
* A mapping of tags which should be assigned to this Azure Bot Service.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return A mapping of tags which should be assigned to this Azure Bot Service.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public ServiceAzureBot(java.lang.String name) {
this(name, ServiceAzureBotArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public ServiceAzureBot(java.lang.String name, ServiceAzureBotArgs 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 ServiceAzureBot(java.lang.String name, ServiceAzureBotArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:bot/serviceAzureBot:ServiceAzureBot", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private ServiceAzureBot(java.lang.String name, Output id, @Nullable ServiceAzureBotState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:bot/serviceAzureBot:ServiceAzureBot", name, state, makeResourceOptions(options, id), false);
}
private static ServiceAzureBotArgs makeArgs(ServiceAzureBotArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? ServiceAzureBotArgs.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(
"developerAppInsightsApiKey",
"luisKey"
))
.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 ServiceAzureBot get(java.lang.String name, Output id, @Nullable ServiceAzureBotState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new ServiceAzureBot(name, id, state, options);
}
}