text: # coding=utf-8
  # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
  
  import warnings
  import pulumi
  import pulumi.runtime
  from typing import Any, Mapping, Optional, Sequence, Union
  from .. import _utilities, _tables
  
  __all__ = ['CloudFormationStack']
  
  
  class CloudFormationStack(pulumi.CustomResource):
      def __init__(__self__,
                   resource_name: str,
                   opts: Optional[pulumi.ResourceOptions] = None,
                   application_id: Optional[pulumi.Input[str]] = None,
                   capabilities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                   name: Optional[pulumi.Input[str]] = None,
                   parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                   semantic_version: Optional[pulumi.Input[str]] = None,
                   tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                   __props__=None,
                   __name__=None,
                   __opts__=None):
          """
          Deploys an Application CloudFormation Stack from the Serverless Application Repository.
  
          ## Example Usage
  
          ```python
          import pulumi
          import pulumi_aws as aws
  
          current_partition = aws.get_partition()
          current_region = aws.get_region()
          postgres_rotator = aws.serverlessrepository.CloudFormationStack("postgres-rotator",
              application_id="arn:aws:serverlessrepo:us-east-1:297356227824:applications/SecretsManagerRDSPostgreSQLRotationSingleUser",
              capabilities=[
                  "CAPABILITY_IAM",
                  "CAPABILITY_RESOURCE_POLICY",
              ],
              parameters={
                  "endpoint": f"secretsmanager.{current_region.name}.{current_partition.dns_suffix}",
                  "function_name": "func-postgres-rotator",
              })
          ```
  
          ## Import
  
          Serverless Application Repository Stack can be imported using the CloudFormation Stack name (with or without the `serverlessrepo-` prefix) or the CloudFormation Stack ID, e.g.
  
          ```sh
           $ pulumi import aws:serverlessrepository/cloudFormationStack:CloudFormationStack example serverlessrepo-postgres-rotator
          ```
  
          :param str resource_name: The name of the resource.
          :param pulumi.ResourceOptions opts: Options for the resource.
          :param pulumi.Input[str] application_id: The ARN of the application from the Serverless Application Repository.
          :param pulumi.Input[Sequence[pulumi.Input[str]]] capabilities: A list of capabilities. Valid values are `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_RESOURCE_POLICY`, or `CAPABILITY_AUTO_EXPAND`
          :param pulumi.Input[str] name: The name of the stack to create. The resource deployed in AWS will be prefixed with `serverlessrepo-`
          :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of Parameter structures that specify input parameters for the stack.
          :param pulumi.Input[str] semantic_version: The version of the application to deploy. If not supplied, deploys the latest version.
          :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A list of tags to associate with this stack.
          """
          if __name__ is not None:
              warnings.warn("explicit use of __name__ is deprecated", DeprecationWarning)
              resource_name = __name__
          if __opts__ is not None:
              warnings.warn("explicit use of __opts__ is deprecated, use 'opts' instead", DeprecationWarning)
              opts = __opts__
          if opts is None:
              opts = pulumi.ResourceOptions()
          if not isinstance(opts, pulumi.ResourceOptions):
              raise TypeError('Expected resource options to be a ResourceOptions instance')
          if opts.version is None:
              opts.version = _utilities.get_version()
          if opts.id is None:
              if __props__ is not None:
                  raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
              __props__ = dict()
  
              if application_id is None and not opts.urn:
                  raise TypeError("Missing required property 'application_id'")
              __props__['application_id'] = application_id
              if capabilities is None and not opts.urn:
                  raise TypeError("Missing required property 'capabilities'")
              __props__['capabilities'] = capabilities
              __props__['name'] = name
              __props__['parameters'] = parameters
              __props__['semantic_version'] = semantic_version
              __props__['tags'] = tags
              __props__['outputs'] = None
          super(CloudFormationStack, __self__).__init__(
              'aws:serverlessrepository/cloudFormationStack:CloudFormationStack',
              resource_name,
              __props__,
              opts)
  
      @staticmethod
      def get(resource_name: str,
              id: pulumi.Input[str],
              opts: Optional[pulumi.ResourceOptions] = None,
              application_id: Optional[pulumi.Input[str]] = None,
              capabilities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
              name: Optional[pulumi.Input[str]] = None,
              outputs: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
              parameters: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
              semantic_version: Optional[pulumi.Input[str]] = None,
              tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None) -> 'CloudFormationStack':
          """
          Get an existing CloudFormationStack resource's state with the given name, id, and optional extra
          properties used to qualify the lookup.
  
          :param str resource_name: The unique name of the resulting resource.
          :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
          :param pulumi.ResourceOptions opts: Options for the resource.
          :param pulumi.Input[str] application_id: The ARN of the application from the Serverless Application Repository.
          :param pulumi.Input[Sequence[pulumi.Input[str]]] capabilities: A list of capabilities. Valid values are `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_RESOURCE_POLICY`, or `CAPABILITY_AUTO_EXPAND`
          :param pulumi.Input[str] name: The name of the stack to create. The resource deployed in AWS will be prefixed with `serverlessrepo-`
          :param pulumi.Input[Mapping[str, pulumi.Input[str]]] outputs: A map of outputs from the stack.
          :param pulumi.Input[Mapping[str, pulumi.Input[str]]] parameters: A map of Parameter structures that specify input parameters for the stack.
          :param pulumi.Input[str] semantic_version: The version of the application to deploy. If not supplied, deploys the latest version.
          :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: A list of tags to associate with this stack.
          """
          opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
  
          __props__ = dict()
  
          __props__["application_id"] = application_id
          __props__["capabilities"] = capabilities
          __props__["name"] = name
          __props__["outputs"] = outputs
          __props__["parameters"] = parameters
          __props__["semantic_version"] = semantic_version
          __props__["tags"] = tags
          return CloudFormationStack(resource_name, opts=opts, __props__=__props__)
  
      @property
      @pulumi.getter(name="applicationId")
      def application_id(self) -> pulumi.Output[str]:
          """
          The ARN of the application from the Serverless Application Repository.
          """
          return pulumi.get(self, "application_id")
  
      @property
      @pulumi.getter
      def capabilities(self) -> pulumi.Output[Sequence[str]]:
          """
          A list of capabilities. Valid values are `CAPABILITY_IAM`, `CAPABILITY_NAMED_IAM`, `CAPABILITY_RESOURCE_POLICY`, or `CAPABILITY_AUTO_EXPAND`
          """
          return pulumi.get(self, "capabilities")
  
      @property
      @pulumi.getter
      def name(self) -> pulumi.Output[str]:
          """
          The name of the stack to create. The resource deployed in AWS will be prefixed with `serverlessrepo-`
          """
          return pulumi.get(self, "name")
  
      @property
      @pulumi.getter
      def outputs(self) -> pulumi.Output[Mapping[str, str]]:
          """
          A map of outputs from the stack.
          """
          return pulumi.get(self, "outputs")
  
      @property
      @pulumi.getter
      def parameters(self) -> pulumi.Output[Mapping[str, str]]:
          """
          A map of Parameter structures that specify input parameters for the stack.
          """
          return pulumi.get(self, "parameters")
  
      @property
      @pulumi.getter(name="semanticVersion")
      def semantic_version(self) -> pulumi.Output[str]:
          """
          The version of the application to deploy. If not supplied, deploys the latest version.
          """
          return pulumi.get(self, "semantic_version")
  
      @property
      @pulumi.getter
      def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
          """
          A list of tags to associate with this stack.
          """
          return pulumi.get(self, "tags")
  
      def translate_output_property(self, prop):
          return _tables.CAMEL_TO_SNAKE_CASE_TABLE.get(prop) or prop
  
      def translate_input_property(self, prop):
          return _tables.SNAKE_TO_CAMEL_CASE_TABLE.get(prop) or prop
  
  