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

com.pulumi.aws.appconfig.ExtensionAssociation Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

The 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.aws.appconfig;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.appconfig.ExtensionAssociationArgs;
import com.pulumi.aws.appconfig.inputs.ExtensionAssociationState;
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.Integer;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Associates an AppConfig Extension with a Resource.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.sns.Topic;
 * import com.pulumi.aws.sns.TopicArgs;
 * import com.pulumi.aws.iam.IamFunctions;
 * import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
 * import com.pulumi.aws.iam.Role;
 * import com.pulumi.aws.iam.RoleArgs;
 * import com.pulumi.aws.appconfig.Extension;
 * import com.pulumi.aws.appconfig.ExtensionArgs;
 * import com.pulumi.aws.appconfig.inputs.ExtensionActionPointArgs;
 * import com.pulumi.aws.appconfig.Application;
 * import com.pulumi.aws.appconfig.ApplicationArgs;
 * import com.pulumi.aws.appconfig.ExtensionAssociation;
 * import com.pulumi.aws.appconfig.ExtensionAssociationArgs;
 * 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 testTopic = new Topic("testTopic", TopicArgs.builder()
 *             .name("test")
 *             .build());
 * 
 *         final var test = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
 *             .statements(GetPolicyDocumentStatementArgs.builder()
 *                 .actions("sts:AssumeRole")
 *                 .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
 *                     .type("Service")
 *                     .identifiers("appconfig.amazonaws.com")
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *         var testRole = new Role("testRole", RoleArgs.builder()
 *             .name("test")
 *             .assumeRolePolicy(test.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.json()))
 *             .build());
 * 
 *         var testExtension = new Extension("testExtension", ExtensionArgs.builder()
 *             .name("test")
 *             .description("test description")
 *             .actionPoints(ExtensionActionPointArgs.builder()
 *                 .point("ON_DEPLOYMENT_COMPLETE")
 *                 .actions(ExtensionActionPointActionArgs.builder()
 *                     .name("test")
 *                     .roleArn(testRole.arn())
 *                     .uri(testTopic.arn())
 *                     .build())
 *                 .build())
 *             .tags(Map.of("Type", "AppConfig Extension"))
 *             .build());
 * 
 *         var testApplication = new Application("testApplication", ApplicationArgs.builder()
 *             .name("test")
 *             .build());
 * 
 *         var testExtensionAssociation = new ExtensionAssociation("testExtensionAssociation", ExtensionAssociationArgs.builder()
 *             .extensionArn(testExtension.arn())
 *             .resourceArn(testApplication.arn())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Using `pulumi import`, import AppConfig Extension Associations using their extension association ID. For example: * * ```sh * $ pulumi import aws:appconfig/extensionAssociation:ExtensionAssociation example 71rxuzt * ``` * */ @ResourceType(type="aws:appconfig/extensionAssociation:ExtensionAssociation") public class ExtensionAssociation extends com.pulumi.resources.CustomResource { /** * ARN of the AppConfig Extension Association. * */ @Export(name="arn", refs={String.class}, tree="[0]") private Output arn; /** * @return ARN of the AppConfig Extension Association. * */ public Output arn() { return this.arn; } /** * The ARN of the extension defined in the association. * */ @Export(name="extensionArn", refs={String.class}, tree="[0]") private Output extensionArn; /** * @return The ARN of the extension defined in the association. * */ public Output extensionArn() { return this.extensionArn; } /** * The version number for the extension defined in the association. * */ @Export(name="extensionVersion", refs={Integer.class}, tree="[0]") private Output extensionVersion; /** * @return The version number for the extension defined in the association. * */ public Output extensionVersion() { return this.extensionVersion; } /** * The parameter names and values defined for the association. * */ @Export(name="parameters", refs={Map.class,String.class}, tree="[0,1,1]") private Output> parameters; /** * @return The parameter names and values defined for the association. * */ public Output>> parameters() { return Codegen.optional(this.parameters); } /** * The ARN of the application, configuration profile, or environment to associate with the extension. * */ @Export(name="resourceArn", refs={String.class}, tree="[0]") private Output resourceArn; /** * @return The ARN of the application, configuration profile, or environment to associate with the extension. * */ public Output resourceArn() { return this.resourceArn; } /** * * @param name The _unique_ name of the resulting resource. */ public ExtensionAssociation(java.lang.String name) { this(name, ExtensionAssociationArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ExtensionAssociation(java.lang.String name, ExtensionAssociationArgs 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 ExtensionAssociation(java.lang.String name, ExtensionAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:appconfig/extensionAssociation:ExtensionAssociation", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ExtensionAssociation(java.lang.String name, Output id, @Nullable ExtensionAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("aws:appconfig/extensionAssociation:ExtensionAssociation", name, state, makeResourceOptions(options, id), false); } private static ExtensionAssociationArgs makeArgs(ExtensionAssociationArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ExtensionAssociationArgs.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()) .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 ExtensionAssociation get(java.lang.String name, Output id, @Nullable ExtensionAssociationState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ExtensionAssociation(name, id, state, options); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy