createResourceSet method
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.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter resourceSetName :
The name of the resource set to create.
Parameter resourceSetType :
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
Parameter resources :
A list of resource objects in the resource set.
Parameter tags :
A tag to associate with the parameters for a resource set.
Implementation
Future<CreateResourceSetResponse> createResourceSet({
required String resourceSetName,
required String resourceSetType,
required List<Resource> resources,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'resourceSetName': resourceSetName,
'resourceSetType': resourceSetType,
'resources': resources,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/resourcesets',
exceptionFnMap: _exceptionFns,
);
return CreateResourceSetResponse.fromJson(response);
}