createInstanceProfile method
Creates the instance profile using the specified parameters.
May throw AccessDeniedFault.
May throw FailedDependencyFault.
May throw InvalidResourceStateFault.
May throw KMSKeyNotAccessibleFault.
May throw ResourceAlreadyExistsFault.
May throw ResourceNotFoundFault.
May throw ResourceQuotaExceededFault.
May throw S3AccessDeniedFault.
May throw S3ResourceNotFoundFault.
Parameter availabilityZone :
The Availability Zone where the instance profile will be created. The
default value is a random, system-chosen Availability Zone in the Amazon
Web Services Region where your data provider is created, for examplem
us-east-1d.
Parameter description :
A user-friendly description of the instance profile.
Parameter instanceProfileName :
A user-friendly name for the instance profile.
Parameter kmsKeyArn :
The Amazon Resource Name (ARN) of the KMS key that is used to encrypt the
connection parameters for the instance profile.
If you don't specify a value for the KmsKeyArn parameter,
then DMS uses an Amazon Web Services owned encryption key to encrypt your
resources.
Parameter networkType :
Specifies the network type for the instance profile. A value of
IPV4 represents an instance profile with IPv4 network type
and only supports IPv4 addressing. A value of IPV6 represents
an instance profile with IPv6 network type and only supports IPv6
addressing. A value of DUAL represents an instance profile
with dual network type that supports IPv4 and IPv6 addressing.
Parameter publiclyAccessible :
Specifies the accessibility options for the instance profile. A value of
true represents an instance profile with a public IP address.
A value of false represents an instance profile with a
private IP address. The default value is true.
Parameter subnetGroupIdentifier :
A subnet group to associate with the instance profile.
Parameter tags :
One or more tags to be assigned to the instance profile.
Parameter vpcSecurityGroups :
Specifies the VPC security group names to be used with the instance
profile. The VPC security group must work with the VPC containing the
instance profile.
Implementation
Future<CreateInstanceProfileResponse> createInstanceProfile({
String? availabilityZone,
String? description,
String? instanceProfileName,
String? kmsKeyArn,
String? networkType,
bool? publiclyAccessible,
String? subnetGroupIdentifier,
List<Tag>? tags,
List<String>? vpcSecurityGroups,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.CreateInstanceProfile'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (availabilityZone != null) 'AvailabilityZone': availabilityZone,
if (description != null) 'Description': description,
if (instanceProfileName != null)
'InstanceProfileName': instanceProfileName,
if (kmsKeyArn != null) 'KmsKeyArn': kmsKeyArn,
if (networkType != null) 'NetworkType': networkType,
if (publiclyAccessible != null)
'PubliclyAccessible': publiclyAccessible,
if (subnetGroupIdentifier != null)
'SubnetGroupIdentifier': subnetGroupIdentifier,
if (tags != null) 'Tags': tags,
if (vpcSecurityGroups != null) 'VpcSecurityGroups': vpcSecurityGroups,
},
);
return CreateInstanceProfileResponse.fromJson(jsonResponse.body);
}