Skip to content

update_relationship

update_relationship(
    catalog: Catalog,
    identifier: RelationshipIdentifier,
    program_management_account_identifier: ProgramManagementAccountIdentifier,
    *,
    config_overrides: Optional[PartnerCentralChannelClientConfig] = None,
    revision: Optional[Revision] = None,
    display_name: Optional[RelationshipDisplayName] = None,
    requested_support_plan: Optional[SupportPlan] = None,
) -> UpdateRelationshipResponse

Updates the properties of a partner relationship.

Parameters:

  • catalog (Catalog) –

    The catalog identifier for the relationship.

  • identifier (RelationshipIdentifier) –

    The unique identifier of the relationship to update.

  • program_management_account_identifier (ProgramManagementAccountIdentifier) –

    The identifier of the program management account associated with the relationship.

  • revision (Optional[Revision], default: None ) –

    The current revision number of the relationship.

  • display_name (Optional[RelationshipDisplayName], default: None ) –

    The new display name for the relationship.

  • requested_support_plan (Optional[SupportPlan], default: None ) –

    The updated support plan for the relationship.

Raises:

Examples:

Example for UpdateRelationship

>>> client.update_relationship(catalog='AWS', program_management_account_identifier='pma-u8ic702rtzng8', identifier='rs-l9o4fj3b5zb91', revision='3', display_name='TestDisplayName')
Source code in docs_src/capo_partnercentral_channel/_services/partner_central_channel.py
def update_relationship(
    self,
    catalog: "capo_partnercentral_channel.types.catalog.Catalog",
    identifier: "capo_partnercentral_channel.types.relationship_identifier.RelationshipIdentifier",
    program_management_account_identifier: "capo_partnercentral_channel.types.program_management_account_identifier.ProgramManagementAccountIdentifier",
    *,
    config_overrides: Optional[PartnerCentralChannelClientConfig] = None,
    revision: Optional[
        "capo_partnercentral_channel.types.revision.Revision"
    ] = None,
    display_name: Optional[
        "capo_partnercentral_channel.types.relationship_display_name.RelationshipDisplayName"
    ] = None,
    requested_support_plan: Optional[
        "capo_partnercentral_channel.types.support_plan.SupportPlan"
    ] = None,
) -> "capo_partnercentral_channel.types.update_relationship_response.UpdateRelationshipResponse":
    """<p>Updates the properties of a partner relationship.</p>

    Args:
        catalog: <p>The catalog identifier for the relationship.</p>
        identifier: <p>The unique identifier of the relationship to update.</p>
        program_management_account_identifier: <p>The identifier of the program management account associated with the relationship.</p>
        revision: <p>The current revision number of the relationship.</p>
        display_name: <p>The new display name for the relationship.</p>
        requested_support_plan: <p>The updated support plan for the relationship.</p>

    Raises:
        capo_partnercentral_channel.errors.access_denied_exception.AccessDeniedException: <p>The request was denied due to insufficient permissions.</p>
        capo_partnercentral_channel.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred while processing the request.</p>
        capo_partnercentral_channel.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_partnercentral_channel.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests being sent in a short period.</p>
        capo_partnercentral_channel.errors.validation_exception.ValidationException: <p>The request failed validation due to invalid input parameters.</p>
        capo_partnercentral_channel.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the resource.</p>
        capo_partnercentral_channel.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Example for UpdateRelationship

        >>> client.update_relationship(catalog='AWS', program_management_account_identifier='pma-u8ic702rtzng8', identifier='rs-l9o4fj3b5zb91', revision='3', display_name='TestDisplayName')
    """

    def _handler(
        req: "OperationRequest[capo_partnercentral_channel.types.update_relationship_request.UpdateRelationshipRequest]",
    ) -> OperationResponse[
        "capo_partnercentral_channel.types.update_relationship_response.UpdateRelationshipResponse"
    ]:
        import capo_partnercentral_channel._operations.partner_central_channel.update_relationship

        output, http_response = (
            capo_partnercentral_channel._operations.partner_central_channel.update_relationship.update_relationship(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRelationship")
    )
    input_: capo_partnercentral_channel.types.update_relationship_request.UpdateRelationshipRequest = {
        "catalog": catalog,
        "identifier": identifier,
        "program_management_account_identifier": program_management_account_identifier,
    }
    if revision is not None:
        input_["revision"] = revision
    if display_name is not None:
        input_["display_name"] = display_name
    if requested_support_plan is not None:
        input_["requested_support_plan"] = requested_support_plan

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output