registerOnPremisesInstance method
Registers an on-premises instance.
May throw IamArnRequiredException.
May throw IamSessionArnAlreadyRegisteredException.
May throw IamUserArnAlreadyRegisteredException.
May throw IamUserArnRequiredException.
May throw InstanceNameAlreadyRegisteredException.
May throw InstanceNameRequiredException.
May throw InvalidIamSessionArnException.
May throw InvalidIamUserArnException.
May throw InvalidInstanceNameException.
May throw MultipleIamArnsProvidedException.
Parameter instanceName :
The name of the on-premises instance to register.
Parameter iamSessionArn :
The ARN of the IAM session to associate with the on-premises instance.
Parameter iamUserArn :
The ARN of the user to associate with the on-premises instance.
Implementation
Future<void> registerOnPremisesInstance({
required String instanceName,
String? iamSessionArn,
String? iamUserArn,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeDeploy_20141006.RegisterOnPremisesInstance'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'instanceName': instanceName,
if (iamSessionArn != null) 'iamSessionArn': iamSessionArn,
if (iamUserArn != null) 'iamUserArn': iamUserArn,
},
);
}