createEnvironmentConnector method

Future<CreateEnvironmentConnectorResponse> createEnvironmentConnector({
  1. required String applianceFqdn,
  2. required String environmentId,
  3. required String secretIdentifier,
  4. required ConnectorType type,
  5. String? clientToken,
})

Creates a connector for an Amazon EVS environment. A connector allows the Amazon EVS control plane to interface with VCF appliances using a fully qualified domain name.

You can create only one connector of each type per environment. For environments where Amazon EVS installs VCF, the SDDC_MANAGER connector is created automatically.

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

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

Parameter environmentId : A unique ID for the environment to create the connector in.

Parameter secretIdentifier : The ARN or name of the Amazon Web Services Secrets Manager secret that stores the credentials for the VCF appliance. SDDC_MANAGER requires an apiKey field; OPERATIONS_MANAGER and VCENTER require username and password fields.

Parameter type : The type of connector to create.

  • OPERATIONS_MANAGER: Connector to an Operations Manager appliance. Required for VCF 9x environments.
  • SDDC_MANAGER: Connector to an SDDC Manager appliance. Required for VCF 5.x environments.
  • VCENTER: Connector to a vCenter Server appliance. Required for features that depend on vCenter, such as Windows Server license-included.

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

Implementation

Future<CreateEnvironmentConnectorResponse> createEnvironmentConnector({
  required String applianceFqdn,
  required String environmentId,
  required String secretIdentifier,
  required ConnectorType type,
  String? clientToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AmazonElasticVMwareService.CreateEnvironmentConnector'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'applianceFqdn': applianceFqdn,
      'environmentId': environmentId,
      'secretIdentifier': secretIdentifier,
      'type': type.value,
      'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    },
  );

  return CreateEnvironmentConnectorResponse.fromJson(jsonResponse.body);
}