modifyInstanceProfile method
Modifies the specified instance profile using the provided parameters.
May throw AccessDeniedFault.
May throw FailedDependencyFault.
May throw InvalidResourceStateFault.
May throw KMSKeyNotAccessibleFault.
May throw ResourceNotFoundFault.
May throw S3AccessDeniedFault.
May throw S3ResourceNotFoundFault.
Parameter instanceProfileIdentifier :
The identifier of the instance profile. Identifiers must begin with a
letter and must contain only ASCII letters, digits, and hyphens. They
can't end with a hyphen, or contain two consecutive hyphens.
Parameter availabilityZone :
The Availability Zone where the instance profile runs.
Parameter description :
A user-friendly description for 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 vpcSecurityGroups :
Specifies the VPC security groups to be used with the instance profile.
The VPC security group must work with the VPC containing the instance
profile.
Implementation
Future<ModifyInstanceProfileResponse> modifyInstanceProfile({
required String instanceProfileIdentifier,
String? availabilityZone,
String? description,
String? instanceProfileName,
String? kmsKeyArn,
String? networkType,
bool? publiclyAccessible,
String? subnetGroupIdentifier,
List<String>? vpcSecurityGroups,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonDMSv20160101.ModifyInstanceProfile'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'InstanceProfileIdentifier': instanceProfileIdentifier,
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 (vpcSecurityGroups != null) 'VpcSecurityGroups': vpcSecurityGroups,
},
);
return ModifyInstanceProfileResponse.fromJson(jsonResponse.body);
}