getDepotUrl method

Future<GetDepotUrlResponse> getDepotUrl({
  1. required String environmentId,
  2. bool? rotate,
})

Returns a URL and authentication token for accessing the Amazon EVS Custom Addon depot. Configure the depot URL as a download source in vSphere Lifecycle Manager (vLCM) to sync and install the Amazon EVS Custom Addon.

The depot URL remains active until you rotate the authentication token by calling this action with rotate set to true.

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

Parameter environmentId : The unique ID of the Amazon EVS environment to get the depot URL for.

Parameter rotate : Revokes the current authentication token and returns a new depot URL with a new token. Previously issued depot URLs will stop working within 5 minutes of rotation.

Implementation

Future<GetDepotUrlResponse> getDepotUrl({
  required String environmentId,
  bool? rotate,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AmazonElasticVMwareService.GetDepotUrl'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'environmentId': environmentId,
      if (rotate != null) 'rotate': rotate,
    },
  );

  return GetDepotUrlResponse.fromJson(jsonResponse.body);
}