getInstanceProfile method
Retrieves information about the specified instance profile, including the instance profile's path, GUID, ARN, and role. For more information about instance profiles, see About Instance Profiles in the IAM User Guide.
May throw NoSuchEntityException. May throw ServiceFailureException.
Parameter instanceProfileName
:
The name of the instance profile to get information about.
This parameter allows (through its regex pattern) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
Implementation
Future<GetInstanceProfileResponse> getInstanceProfile({
required String instanceProfileName,
}) async {
ArgumentError.checkNotNull(instanceProfileName, 'instanceProfileName');
_s.validateStringLength(
'instanceProfileName',
instanceProfileName,
1,
128,
isRequired: true,
);
final $request = <String, dynamic>{};
$request['InstanceProfileName'] = instanceProfileName;
final $result = await _protocol.send(
$request,
action: 'GetInstanceProfile',
version: '2010-05-08',
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
shape: shapes['GetInstanceProfileRequest'],
shapes: shapes,
resultWrapper: 'GetInstanceProfileResult',
);
return GetInstanceProfileResponse.fromXml($result);
}