putHypervisorPropertyMappings method

Future<PutHypervisorPropertyMappingsOutput> putHypervisorPropertyMappings({
  1. required String hypervisorArn,
  2. required String iamRoleArn,
  3. required List<VmwareToAwsTagMapping> vmwareToAwsTagMappings,
})

This action sets the property mappings for the specified hypervisor. A hypervisor property mapping displays the relationship of entity properties available from the hypervisor to the properties available in Amazon Web Services.

May throw AccessDeniedException. May throw ConflictException. May throw ResourceNotFoundException.

Parameter hypervisorArn : The Amazon Resource Name (ARN) of the hypervisor.

Parameter iamRoleArn : The Amazon Resource Name (ARN) of the IAM role.

Parameter vmwareToAwsTagMappings : This action requests the mappings of VMware tags to the Amazon Web Services tags.

Implementation

Future<PutHypervisorPropertyMappingsOutput> putHypervisorPropertyMappings({
  required String hypervisorArn,
  required String iamRoleArn,
  required List<VmwareToAwsTagMapping> vmwareToAwsTagMappings,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'BackupOnPremises_v20210101.PutHypervisorPropertyMappings'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'HypervisorArn': hypervisorArn,
      'IamRoleArn': iamRoleArn,
      'VmwareToAwsTagMappings': vmwareToAwsTagMappings,
    },
  );

  return PutHypervisorPropertyMappingsOutput.fromJson(jsonResponse.body);
}