updateHost method
Future<void>
updateHost({
- required String hostArn,
- String? providerEndpoint,
- VpcConfiguration? vpcConfiguration,
Updates a specified host with the provided configurations.
May throw ConflictException. May throw ResourceNotFoundException. May throw ResourceUnavailableException. May throw UnsupportedOperationException.
Parameter hostArn
:
The Amazon Resource Name (ARN) of the host to be updated.
Parameter providerEndpoint
:
The URL or endpoint of the host to be updated.
Parameter vpcConfiguration
:
The VPC configuration of the host to be updated. A VPC must be configured
and the infrastructure to be represented by the host must already be
connected to the VPC.
Implementation
Future<void> updateHost({
required String hostArn,
String? providerEndpoint,
VpcConfiguration? vpcConfiguration,
}) async {
ArgumentError.checkNotNull(hostArn, 'hostArn');
_s.validateStringLength(
'hostArn',
hostArn,
0,
256,
isRequired: true,
);
_s.validateStringLength(
'providerEndpoint',
providerEndpoint,
1,
512,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target':
'com.amazonaws.codestar.connections.CodeStar_connections_20191201.UpdateHost'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'HostArn': hostArn,
if (providerEndpoint != null) 'ProviderEndpoint': providerEndpoint,
if (vpcConfiguration != null) 'VpcConfiguration': vpcConfiguration,
},
);
}