updateEnvironmentConnector method

Future<UpdateEnvironmentConnectorResponse> updateEnvironmentConnector({
  1. required String connectorId,
  2. required String environmentId,
  3. String? applianceFqdn,
  4. String? clientToken,
  5. String? secretIdentifier,
})

Updates a connector for an Amazon EVS environment. You can update the Amazon Web Services Secrets Manager secret ARN or the appliance FQDN to reconfigure the connector metadata.

May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter connectorId : A unique ID for the connector to update.

Parameter environmentId : A unique ID for the environment that the connector belongs to.

Parameter applianceFqdn : The new fully qualified domain name (FQDN) of the VCF appliance that the connector connects to.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure the idempotency of the connector update request. If you do not specify a client token, a randomly generated token is used for the request to ensure idempotency.

Parameter secretIdentifier : The new ARN or name of the Amazon Web Services Secrets Manager secret that stores the credentials for the VCF appliance.

Implementation

Future<UpdateEnvironmentConnectorResponse> updateEnvironmentConnector({
  required String connectorId,
  required String environmentId,
  String? applianceFqdn,
  String? clientToken,
  String? secretIdentifier,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AmazonElasticVMwareService.UpdateEnvironmentConnector'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'connectorId': connectorId,
      'environmentId': environmentId,
      if (applianceFqdn != null) 'applianceFqdn': applianceFqdn,
      'clientToken': clientToken ?? _s.generateIdempotencyToken(),
      if (secretIdentifier != null) 'secretIdentifier': secretIdentifier,
    },
  );

  return UpdateEnvironmentConnectorResponse.fromJson(jsonResponse.body);
}