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

com.pulumi.azure.bot.ChannelFacebook 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.bot;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.bot.ChannelFacebookArgs;
import com.pulumi.azure.bot.inputs.ChannelFacebookState;
import com.pulumi.azure.bot.outputs.ChannelFacebookPage;
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.String;
import java.util.List;
import javax.annotation.Nullable;

/**
 * Manages a Facebook integration for a Bot Channel
 * 
 * > **Note** A bot can only have a single Facebook Channel associated with it.
 * 
 * ## 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.CoreFunctions;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.bot.ChannelsRegistration;
 * import com.pulumi.azure.bot.ChannelsRegistrationArgs;
 * import com.pulumi.azure.bot.ChannelFacebook;
 * import com.pulumi.azure.bot.ChannelFacebookArgs;
 * import com.pulumi.azure.bot.inputs.ChannelFacebookPageArgs;
 * 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) {
 *         final var current = CoreFunctions.getClientConfig();
 * 
 *         var example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 * 
 *         var exampleChannelsRegistration = new ChannelsRegistration("exampleChannelsRegistration", ChannelsRegistrationArgs.builder()
 *             .name("example-bcr")
 *             .location("global")
 *             .resourceGroupName(example.name())
 *             .sku("F0")
 *             .microsoftAppId(current.applyValue(getClientConfigResult -> getClientConfigResult.clientId()))
 *             .build());
 * 
 *         var exampleChannelFacebook = new ChannelFacebook("exampleChannelFacebook", ChannelFacebookArgs.builder()
 *             .botName(exampleChannelsRegistration.name())
 *             .location(exampleChannelsRegistration.location())
 *             .resourceGroupName(example.name())
 *             .facebookApplicationId("563490254873576")
 *             .facebookApplicationSecret("8976d2536445ad5b976dee8437b9beb0")
 *             .pages(ChannelFacebookPageArgs.builder()
 *                 .id("876248795081953")
 *                 .accessToken("CGGCec3UAFPMBAKwK3Ft8SEpO8ZCuvpNBI5DClaJCDfqJj2BgEHCKxcY0FDarmUQap6XxpZC9GWCW4nZCzjcKosAZAP7SO44X8Q8gAntbDIXgYUBGp9xtS8wUkwgKPobUePcOOVFkvClxvYZByuiQxoTiK9fQ9jZCPEorbmZCsKDZAx4VLnrNwCTZAPUwXxO61gfq4ZD")
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * The Facebook Integration for a Bot Channel can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:bot/channelFacebook:ChannelFacebook example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.BotService/botServices/botService1/channels/FacebookChannel * ``` * */ @ResourceType(type="azure:bot/channelFacebook:ChannelFacebook") public class ChannelFacebook extends com.pulumi.resources.CustomResource { /** * The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created. * */ @Export(name="botName", refs={String.class}, tree="[0]") private Output botName; /** * @return The name of the Bot Resource this channel will be associated with. Changing this forces a new resource to be created. * */ public Output botName() { return this.botName; } /** * The Facebook Application ID for the Facebook Channel. * */ @Export(name="facebookApplicationId", refs={String.class}, tree="[0]") private Output facebookApplicationId; /** * @return The Facebook Application ID for the Facebook Channel. * */ public Output facebookApplicationId() { return this.facebookApplicationId; } /** * The Facebook Application Secret for the Facebook Channel. * */ @Export(name="facebookApplicationSecret", refs={String.class}, tree="[0]") private Output facebookApplicationSecret; /** * @return The Facebook Application Secret for the Facebook Channel. * */ public Output facebookApplicationSecret() { return this.facebookApplicationSecret; } /** * 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; } /** * One or more `page` blocks as defined below. * */ @Export(name="pages", refs={List.class,ChannelFacebookPage.class}, tree="[0,1]") private Output> pages; /** * @return One or more `page` blocks as defined below. * */ public Output> pages() { return this.pages; } /** * The name of the resource group where the Facebook Channel should be created. 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 Facebook Channel should be created. Changing this forces a new resource to be created. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * * @param name The _unique_ name of the resulting resource. */ public ChannelFacebook(java.lang.String name) { this(name, ChannelFacebookArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ChannelFacebook(java.lang.String name, ChannelFacebookArgs 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 ChannelFacebook(java.lang.String name, ChannelFacebookArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:bot/channelFacebook:ChannelFacebook", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ChannelFacebook(java.lang.String name, Output id, @Nullable ChannelFacebookState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:bot/channelFacebook:ChannelFacebook", name, state, makeResourceOptions(options, id), false); } private static ChannelFacebookArgs makeArgs(ChannelFacebookArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ChannelFacebookArgs.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( "facebookApplicationSecret" )) .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 ChannelFacebook get(java.lang.String name, Output id, @Nullable ChannelFacebookState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ChannelFacebook(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy