updateRelationship method

Future<UpdateRelationshipResponse> updateRelationship({
  1. required String catalog,
  2. required String identifier,
  3. required String programManagementAccountIdentifier,
  4. String? displayName,
  5. SupportPlan? requestedSupportPlan,
  6. String? revision,
})

Updates the properties of a partner relationship.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter catalog : The catalog identifier for the relationship.

Parameter identifier : The unique identifier of the relationship to update.

Parameter programManagementAccountIdentifier : The identifier of the program management account associated with the relationship.

Parameter displayName : The new display name for the relationship.

Parameter requestedSupportPlan : The updated support plan for the relationship.

Parameter revision : The current revision number of the relationship.

Implementation

Future<UpdateRelationshipResponse> updateRelationship({
  required String catalog,
  required String identifier,
  required String programManagementAccountIdentifier,
  String? displayName,
  SupportPlan? requestedSupportPlan,
  String? revision,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PartnerCentralChannel.UpdateRelationship'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'catalog': catalog,
      'identifier': identifier,
      'programManagementAccountIdentifier':
          programManagementAccountIdentifier,
      if (displayName != null) 'displayName': displayName,
      if (requestedSupportPlan != null)
        'requestedSupportPlan': requestedSupportPlan,
      if (revision != null) 'revision': revision,
    },
  );

  return UpdateRelationshipResponse.fromJson(jsonResponse.body);
}