createCloudConnector method
Creates a cloud connector that establishes a connection between Systems Manager and a third-party cloud environment.
May throw ConflictException.
May throw InternalServerError.
May throw ServiceQuotaExceededException.
Parameter configConnectorArn :
The ARN of the Amazon Web Services Config connector associated with this
cloud connector.
Parameter configuration :
The configuration details for connecting to the third-party cloud
environment.
Parameter displayName :
A friendly name for the cloud connector.
Parameter roleArn :
The Amazon Resource Name (ARN) of the IAM role that the cloud connector
uses to communicate with the third-party cloud environment.
Parameter description :
A description for the cloud connector.
Parameter tags :
Optional metadata that you assign to a resource. Tags enable you to
categorize a resource in different ways, such as by purpose, owner, or
environment.
Implementation
Future<CreateCloudConnectorResult> createCloudConnector({
required String configConnectorArn,
required CloudConnectorConfiguration configuration,
required String displayName,
required String roleArn,
String? description,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonSSM.CreateCloudConnector'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ConfigConnectorArn': configConnectorArn,
'Configuration': configuration,
'DisplayName': displayName,
'RoleArn': roleArn,
if (description != null) 'Description': description,
if (tags != null) 'Tags': tags,
},
);
return CreateCloudConnectorResult.fromJson(jsonResponse.body);
}