Skip to content

create_resource_set async

create_resource_set(
    *,
    config_overrides: Optional[AsyncRoute53RecoveryReadinessClientConfig] = None,
    resource_set_name: Optional[__string] = None,
    resource_set_type: Optional[__stringPatternAWSAZaZ09AZaZ09] = None,
    resources: Optional[__listOfResource] = None,
    tags: Optional[Tags] = None,
) -> CreateResourceSetResponse

Creates a resource set. A resource set is a set of resources of one type that span multiple cells. You can associate a resource set with a readiness check to monitor the resources for failover readiness.

Parameters:

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

    The name of the resource set to create.

  • resource_set_type (Optional[__stringPatternAWSAZaZ09AZaZ09], default: None ) –

    The resource type of the resources in the resource set. Enter one of the following values for resource type:

    AWS::ApiGateway::Stage, AWS::ApiGatewayV2::Stage, AWS::AutoScaling::AutoScalingGroup, AWS::CloudWatch::Alarm, AWS::EC2::CustomerGateway, AWS::DynamoDB::Table, AWS::EC2::Volume, AWS::ElasticLoadBalancing::LoadBalancer, AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::Lambda::Function, AWS::MSK::Cluster, AWS::RDS::DBCluster, AWS::Route53::HealthCheck, AWS::SQS::Queue, AWS::SNS::Topic, AWS::SNS::Subscription, AWS::EC2::VPC, AWS::EC2::VPNConnection, AWS::EC2::VPNGateway, AWS::Route53RecoveryReadiness::DNSTargetResource

  • resources (Optional[__listOfResource], default: None ) –

    A list of resource objects in the resource set.

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

    A tag to associate with the parameters for a resource set.

Raises:

Source code in docs_src/capo_route53_recovery_readiness/_services/async_route53_recovery_readiness.py
async def create_resource_set(
    self,
    *,
    config_overrides: Optional[AsyncRoute53RecoveryReadinessClientConfig] = None,
    resource_set_name: Optional[
        "capo_route53_recovery_readiness.types.__string.__string"
    ] = None,
    resource_set_type: Optional[
        "capo_route53_recovery_readiness.types.__string_pattern_awsa_za_z09_a_za_z09.__stringPatternAWSAZaZ09AZaZ09"
    ] = None,
    resources: Optional[
        "capo_route53_recovery_readiness.types.__list_of_resource.__listOfResource"
    ] = None,
    tags: Optional["capo_route53_recovery_readiness.types.tags.Tags"] = None,
) -> "capo_route53_recovery_readiness.types.create_resource_set_response.CreateResourceSetResponse":
    """<p>Creates a resource set. A resource set is a set of resources of one type that span multiple cells. You can associate a resource set with a readiness check to monitor the resources for failover readiness.</p>

    Args:
        resource_set_name: <p>The name of the resource set to create.</p>
        resource_set_type: <p>The resource type of the resources in the resource set. Enter one of the following values for resource type:</p> <p>AWS::ApiGateway::Stage, AWS::ApiGatewayV2::Stage, AWS::AutoScaling::AutoScalingGroup, AWS::CloudWatch::Alarm, AWS::EC2::CustomerGateway, AWS::DynamoDB::Table, AWS::EC2::Volume, AWS::ElasticLoadBalancing::LoadBalancer, AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::Lambda::Function, AWS::MSK::Cluster, AWS::RDS::DBCluster, AWS::Route53::HealthCheck, AWS::SQS::Queue, AWS::SNS::Topic, AWS::SNS::Subscription, AWS::EC2::VPC, AWS::EC2::VPNConnection, AWS::EC2::VPNGateway, AWS::Route53RecoveryReadiness::DNSTargetResource</p>
        resources: <p>A list of resource objects in the resource set.</p>
        tags: <p>A tag to associate with the parameters for a resource set.</p>

    Raises:
        capo_route53_recovery_readiness.errors.access_denied_exception.AccessDeniedException: User does not have sufficient access to perform this action.
        capo_route53_recovery_readiness.errors.conflict_exception.ConflictException: Updating or deleting a resource can cause an inconsistent state.
        capo_route53_recovery_readiness.errors.internal_server_exception.InternalServerException: An unexpected error occurred.
        capo_route53_recovery_readiness.errors.throttling_exception.ThrottlingException: Request was denied due to request throttling.
        capo_route53_recovery_readiness.errors.validation_exception.ValidationException: The input fails to satisfy the constraints specified by an AWS service.
        capo_route53_recovery_readiness.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_route53_recovery_readiness.types.create_resource_set_request.CreateResourceSetRequest]",
    ) -> AsyncOperationResponse[
        "capo_route53_recovery_readiness.types.create_resource_set_response.CreateResourceSetResponse"
    ]:
        import capo_route53_recovery_readiness._operations.route53_recovery_readiness.create_resource_set

        (
            output,
            http_response,
        ) = await capo_route53_recovery_readiness._operations.route53_recovery_readiness.create_resource_set.async_create_resource_set(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateResourceSet")
    )
    input_: capo_route53_recovery_readiness.types.create_resource_set_request.CreateResourceSetRequest = {}
    if resource_set_name is not None:
        input_["resource_set_name"] = resource_set_name
    if resource_set_type is not None:
        input_["resource_set_type"] = resource_set_type
    if resources is not None:
        input_["resources"] = resources
    if tags is not None:
        input_["tags"] = tags

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