Class CloudFormationStack


  • public class CloudFormationStack
    extends com.pulumi.resources.CustomResource
    Deploys an Application CloudFormation Stack from the Serverless Application Repository. ## Example Usage <!--Start PulumiCodeChooser -->
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.AwsFunctions;
     import com.pulumi.aws.inputs.GetPartitionArgs;
     import com.pulumi.aws.inputs.GetRegionArgs;
     import com.pulumi.aws.serverlessrepository.CloudFormationStack;
     import com.pulumi.aws.serverlessrepository.CloudFormationStackArgs;
     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 = AwsFunctions.getPartition();
     
             final var currentGetRegion = AwsFunctions.getRegion();
     
             var postgres_rotator = new CloudFormationStack("postgres-rotator", CloudFormationStackArgs.builder()        
                 .name("postgres-rotator")
                 .applicationId("arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser")
                 .capabilities(            
                     "CAPABILITY_IAM",
                     "CAPABILITY_RESOURCE_POLICY")
                 .parameters(Map.ofEntries(
                     Map.entry("functionName", "func-postgres-rotator"),
                     Map.entry("endpoint", String.format("secretsmanager.%s.%s", currentGetRegion.applyValue(getRegionResult -> getRegionResult.name()),current.applyValue(getPartitionResult -> getPartitionResult.dnsSuffix())))
                 ))
                 .build());
     
         }
     }
     
     
    <!--End PulumiCodeChooser --> ## Import Using `pulumi import`, import Serverless Application Repository Stack using the CloudFormation Stack name (with or without the `serverlessrepo-` prefix) or the CloudFormation Stack ID. For example: ```sh $ pulumi import aws:serverlessrepository/cloudFormationStack:CloudFormationStack example serverlessrepo-postgres-rotator ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> applicationId()  
      com.pulumi.core.Output<java.util.List<java.lang.String>> capabilities()  
      static CloudFormationStack get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, CloudFormationStackState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> outputs()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> parameters()  
      com.pulumi.core.Output<java.lang.String> semanticVersion()  
      com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CloudFormationStack

        public CloudFormationStack​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • CloudFormationStack

        public CloudFormationStack​(java.lang.String name,
                                   CloudFormationStackArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • CloudFormationStack

        public CloudFormationStack​(java.lang.String name,
                                   CloudFormationStackArgs args,
                                   @Nullable
                                   com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • applicationId

        public com.pulumi.core.Output<java.lang.String> applicationId()
        Returns:
        The ARN of the application from the Serverless Application Repository.
      • capabilities

        public com.pulumi.core.Output<java.util.List<java.lang.String>> capabilities()
        Returns:
        A list of capabilities. Valid values are `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_RESOURCE_POLICY`, or `CAPABILITY_AUTO_EXPAND`
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        The name of the stack to create. The resource deployed in AWS will be prefixed with `serverlessrepo-`
      • outputs

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> outputs()
        Returns:
        A map of outputs from the stack.
      • parameters

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> parameters()
        Returns:
        A map of Parameter structures that specify input parameters for the stack.
      • semanticVersion

        public com.pulumi.core.Output<java.lang.String> semanticVersion()
        Returns:
        The version of the application to deploy. If not supplied, deploys the latest version.
      • tags

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        A list of tags to associate with this stack. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
      • tagsAll

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>> tagsAll()
        Returns:
        A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
      • get

        public static CloudFormationStack get​(java.lang.String name,
                                              com.pulumi.core.Output<java.lang.String> id,
                                              @Nullable
                                              CloudFormationStackState state,
                                              @Nullable
                                              com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.