Skip to content

create_cloud_formation_change_set async

create_cloud_formation_change_set(
    application_id: __string,
    *,
    config_overrides: Optional[AsyncServerlessApplicationRepositoryClientConfig] = None,
    capabilities: Optional[__listOf__string] = None,
    change_set_name: Optional[__string] = None,
    client_token: Optional[__string] = None,
    description: Optional[__string] = None,
    notification_arns: Optional[__listOf__string] = None,
    parameter_overrides: Optional[__listOfParameterValue] = None,
    resource_types: Optional[__listOf__string] = None,
    rollback_configuration: Optional[RollbackConfiguration] = None,
    semantic_version: Optional[__string] = None,
    stack_name: Optional[__string] = None,
    tags: Optional[__listOfTag] = None,
    template_id: Optional[__string] = None,
) -> CreateCloudFormationChangeSetResponse

Creates an AWS CloudFormation change set for the given application.

Parameters:

  • application_id (__string) –

    The Amazon Resource Name (ARN) of the application.

  • capabilities (Optional[__listOf__string], default: None ) –

    A list of values that you must specify before you can deploy certain applications. Some applications might include resources that can affect permissions in your AWS account, for example, by creating new AWS Identity and Access Management (IAM) users. For those applications, you must explicitly acknowledge their capabilities by specifying this parameter.

    The only valid values are CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_RESOURCE_POLICY, and CAPABILITY_AUTO_EXPAND.

    The following resources require you to specify CAPABILITY_IAM or CAPABILITY_NAMED_IAM: AWS::IAM::Group, AWS::IAM::InstanceProfile, AWS::IAM::Policy, and AWS::IAM::Role. If the application contains IAM resources, you can specify either CAPABILITY_IAM or CAPABILITY_NAMED_IAM. If the application contains IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM.

    The following resources require you to specify CAPABILITY_RESOURCE_POLICY: AWS::Lambda::Permission, AWS::IAM:Policy, AWS::ApplicationAutoScaling::ScalingPolicy, AWS::S3::BucketPolicy, AWS::SQS::QueuePolicy, and AWS::SNS:TopicPolicy.

    Applications that contain one or more nested applications require you to specify CAPABILITY_AUTO_EXPAND.

    If your application template contains any of the above resources, we recommend that you review all permissions associated with the application before deploying. If you don't specify this parameter for an application that requires capabilities, the call will fail.

  • change_set_name (Optional[__string], default: None ) –

    This property corresponds to the parameter of the same name for the AWS CloudFormation CreateChangeSet API.

  • client_token (Optional[__string], default: None ) –

    This property corresponds to the parameter of the same name for the AWS CloudFormation CreateChangeSet API.

  • description (Optional[__string], default: None ) –

    This property corresponds to the parameter of the same name for the AWS CloudFormation CreateChangeSet API.

  • notification_arns (Optional[__listOf__string], default: None ) –

    This property corresponds to the parameter of the same name for the AWS CloudFormation CreateChangeSet API.

  • parameter_overrides (Optional[__listOfParameterValue], default: None ) –

    A list of parameter values for the parameters of the application.

  • resource_types (Optional[__listOf__string], default: None ) –

    This property corresponds to the parameter of the same name for the AWS CloudFormation CreateChangeSet API.

  • rollback_configuration (Optional[RollbackConfiguration], default: None ) –

    This property corresponds to the parameter of the same name for the AWS CloudFormation CreateChangeSet API.

  • semantic_version (Optional[__string], default: None ) –

    The semantic version of the application:

    https://semver.org/

  • stack_name (Optional[__string], default: None ) –

    This property corresponds to the parameter of the same name for the AWS CloudFormation CreateChangeSet API.

  • tags (Optional[__listOfTag], default: None ) –

    This property corresponds to the parameter of the same name for the AWS CloudFormation CreateChangeSet API.

  • template_id (Optional[__string], default: None ) –

    The UUID returned by CreateCloudFormationTemplate.

    Pattern: [0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}

Raises:

Source code in docs_src/capo_serverlessapplicationrepository/_services/async_serverless_application_repository.py
async def create_cloud_formation_change_set(
    self,
    application_id: "capo_serverlessapplicationrepository.types.__string.__string",
    *,
    config_overrides: Optional[
        AsyncServerlessApplicationRepositoryClientConfig
    ] = None,
    capabilities: Optional[
        "capo_serverlessapplicationrepository.types.__list_of__string.__listOf__string"
    ] = None,
    change_set_name: Optional[
        "capo_serverlessapplicationrepository.types.__string.__string"
    ] = None,
    client_token: Optional[
        "capo_serverlessapplicationrepository.types.__string.__string"
    ] = None,
    description: Optional[
        "capo_serverlessapplicationrepository.types.__string.__string"
    ] = None,
    notification_arns: Optional[
        "capo_serverlessapplicationrepository.types.__list_of__string.__listOf__string"
    ] = None,
    parameter_overrides: Optional[
        "capo_serverlessapplicationrepository.types.__list_of_parameter_value.__listOfParameterValue"
    ] = None,
    resource_types: Optional[
        "capo_serverlessapplicationrepository.types.__list_of__string.__listOf__string"
    ] = None,
    rollback_configuration: Optional[
        "capo_serverlessapplicationrepository.types.rollback_configuration.RollbackConfiguration"
    ] = None,
    semantic_version: Optional[
        "capo_serverlessapplicationrepository.types.__string.__string"
    ] = None,
    stack_name: Optional[
        "capo_serverlessapplicationrepository.types.__string.__string"
    ] = None,
    tags: Optional[
        "capo_serverlessapplicationrepository.types.__list_of_tag.__listOfTag"
    ] = None,
    template_id: Optional[
        "capo_serverlessapplicationrepository.types.__string.__string"
    ] = None,
) -> "capo_serverlessapplicationrepository.types.create_cloud_formation_change_set_response.CreateCloudFormationChangeSetResponse":
    r"""<p>Creates an AWS CloudFormation change set for the given application.</p>

    Args:
        application_id: <p>The Amazon Resource Name (ARN) of the application.</p>
        capabilities: <p>A list of values that you must specify before you can deploy certain applications. Some applications might include resources that can affect permissions in your AWS account, for example, by creating new AWS Identity and Access Management (IAM) users. For those applications, you must explicitly acknowledge their capabilities by specifying this parameter.</p><p>The only valid values are CAPABILITY_IAM, CAPABILITY_NAMED_IAM, CAPABILITY_RESOURCE_POLICY, and CAPABILITY_AUTO_EXPAND.</p><p>The following resources require you to specify CAPABILITY_IAM or CAPABILITY_NAMED_IAM: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html">AWS::IAM::Group</a>, <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html">AWS::IAM::InstanceProfile</a>, <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html">AWS::IAM::Policy</a>, and <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html">AWS::IAM::Role</a>. If the application contains IAM resources, you can specify either CAPABILITY_IAM or CAPABILITY_NAMED_IAM. If the application contains IAM resources with custom names, you must specify CAPABILITY_NAMED_IAM.</p><p>The following resources require you to specify CAPABILITY_RESOURCE_POLICY: <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html">AWS::Lambda::Permission</a>, <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-policy.html">AWS::IAM:Policy</a>, <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html">AWS::ApplicationAutoScaling::ScalingPolicy</a>, <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-policy.html">AWS::S3::BucketPolicy</a>, <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sqs-policy.html">AWS::SQS::QueuePolicy</a>, and <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sns-policy.html">AWS::SNS:TopicPolicy</a>.</p><p>Applications that contain one or more nested applications require you to specify CAPABILITY_AUTO_EXPAND.</p><p>If your application template contains any of the above resources, we recommend that you review all permissions associated with the application before deploying. If you don't specify this parameter for an application that requires capabilities, the call will fail.</p>
        change_set_name: <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a> </i> API.</p>
        client_token: <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a> </i> API.</p>
        description: <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a> </i> API.</p>
        notification_arns: <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a> </i> API.</p>
        parameter_overrides: <p>A list of parameter values for the parameters of the application.</p>
        resource_types: <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a> </i> API.</p>
        rollback_configuration: <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a> </i> API.</p>
        semantic_version: <p>The semantic version of the application:</p><p> <a href="https://semver.org/">https://semver.org/</a> </p>
        stack_name: <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a> </i> API.</p>
        tags: <p>This property corresponds to the parameter of the same name for the <i>AWS CloudFormation <a href="https://docs.aws.amazon.com/goto/WebAPI/cloudformation-2010-05-15/CreateChangeSet">CreateChangeSet</a> </i> API.</p>
        template_id: <p>The UUID returned by CreateCloudFormationTemplate.</p><p>Pattern: [0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}</p>

    Raises:
        capo_serverlessapplicationrepository.errors.bad_request_exception.BadRequestException: <p>One of the parameters in the request is invalid.</p>
        capo_serverlessapplicationrepository.errors.forbidden_exception.ForbiddenException: <p>The client is not authenticated.</p>
        capo_serverlessapplicationrepository.errors.internal_server_error_exception.InternalServerErrorException: <p>The AWS Serverless Application Repository service encountered an internal error.</p>
        capo_serverlessapplicationrepository.errors.too_many_requests_exception.TooManyRequestsException: <p>The client is sending more than the allowed number of requests per unit of time.</p>
        capo_serverlessapplicationrepository.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_serverlessapplicationrepository.types.create_cloud_formation_change_set_request.CreateCloudFormationChangeSetRequest]",
    ) -> AsyncOperationResponse[
        "capo_serverlessapplicationrepository.types.create_cloud_formation_change_set_response.CreateCloudFormationChangeSetResponse"
    ]:
        import capo_serverlessapplicationrepository._operations.serverless_application_repository.create_cloud_formation_change_set

        (
            output,
            http_response,
        ) = await capo_serverlessapplicationrepository._operations.serverless_application_repository.create_cloud_formation_change_set.async_create_cloud_formation_change_set(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCloudFormationChangeSet")
    )
    input_: capo_serverlessapplicationrepository.types.create_cloud_formation_change_set_request.CreateCloudFormationChangeSetRequest = {
        "application_id": application_id
    }
    if capabilities is not None:
        input_["capabilities"] = capabilities
    if change_set_name is not None:
        input_["change_set_name"] = change_set_name
    if client_token is not None:
        input_["client_token"] = client_token
    if description is not None:
        input_["description"] = description
    if notification_arns is not None:
        input_["notification_arns"] = notification_arns
    if parameter_overrides is not None:
        input_["parameter_overrides"] = parameter_overrides
    if resource_types is not None:
        input_["resource_types"] = resource_types
    if rollback_configuration is not None:
        input_["rollback_configuration"] = rollback_configuration
    if semantic_version is not None:
        input_["semantic_version"] = semantic_version
    if stack_name is not None:
        input_["stack_name"] = stack_name
    if tags is not None:
        input_["tags"] = tags
    if template_id is not None:
        input_["template_id"] = template_id

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output