Skip to content

update_partnership

update_partnership(
    partnership_id: PartnershipId,
    *,
    config_overrides: Optional[b2biClientConfig] = None,
    name: Optional[PartnerName] = None,
    capabilities: Optional[PartnershipCapabilities] = None,
    capability_options: Optional[CapabilityOptions] = None,
) -> UpdatePartnershipResponse

Updates some of the parameters for a partnership between a customer and trading partner. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.

Parameters:

  • partnership_id (PartnershipId) –

    Specifies the unique, system-generated identifier for a partnership.

  • name (Optional[PartnerName], default: None ) –

    The name of the partnership, used to identify it.

  • capabilities (Optional[PartnershipCapabilities], default: None ) –

    List of the capabilities associated with this partnership.

  • capability_options (Optional[CapabilityOptions], default: None ) –

    To update, specify the structure that contains the details for the associated capabilities.

Raises:

  • AccessDeniedException –

    You do not have sufficient access to perform this action.

  • ConflictException –

    A conflict exception is thrown when you attempt to delete a resource (such as a profile or a capability) that is being used by other resources.

  • InternalServerException –

    This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.

  • ResourceNotFoundException –

    Occurs when the requested resource does not exist, or cannot be found. In some cases, the resource exists in a region other than the region specified in the API call.

  • ServiceQuotaExceededException –

    Occurs when the calling command attempts to exceed one of the service quotas, for example trying to create a capability when you already have the maximum number of capabilities allowed.

  • ThrottlingException –

    The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.

  • ValidationException –

    Occurs when a B2BI object cannot be validated against a request from another object. This exception can be thrown during standard EDI validation or when custom validation rules fail, such as when element length constraints are violated, invalid codes are used in code list validations, or required elements are missing based on configured element requirement rules.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

Sample UpdatePartnership call

>>> client.update_partnership(capabilities=['ca-963a8121e4fc4e348'], name='b2bipartner', partnership_id='ps-219fa02f5b4242af8')
Source code in docs_src/capo_b2bi/_services/b2bi.py
def update_partnership(
    self,
    partnership_id: "capo_b2bi.types.partnership_id.PartnershipId",
    *,
    config_overrides: Optional[b2biClientConfig] = None,
    name: Optional["capo_b2bi.types.partner_name.PartnerName"] = None,
    capabilities: Optional[
        "capo_b2bi.types.partnership_capabilities.PartnershipCapabilities"
    ] = None,
    capability_options: Optional[
        "capo_b2bi.types.capability_options.CapabilityOptions"
    ] = None,
) -> "capo_b2bi.types.update_partnership_response.UpdatePartnershipResponse":
    """<p>Updates some of the parameters for a partnership between a customer and trading partner. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.</p>

    Args:
        partnership_id: <p>Specifies the unique, system-generated identifier for a partnership.</p>
        name: <p>The name of the partnership, used to identify it.</p>
        capabilities: <p>List of the capabilities associated with this partnership.</p>
        capability_options: <p>To update, specify the structure that contains the details for the associated capabilities.</p>

    Raises:
        capo_b2bi.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_b2bi.errors.conflict_exception.ConflictException: <p>A conflict exception is thrown when you attempt to delete a resource (such as a profile or a capability) that is being used by other resources.</p>
        capo_b2bi.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an error occurs in the Amazon Web Services B2B Data Interchange service.</p>
        capo_b2bi.errors.resource_not_found_exception.ResourceNotFoundException: <p>Occurs when the requested resource does not exist, or cannot be found. In some cases, the resource exists in a region other than the region specified in the API call.</p>
        capo_b2bi.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Occurs when the calling command attempts to exceed one of the service quotas, for example trying to create a capability when you already have the maximum number of capabilities allowed.</p>
        capo_b2bi.errors.throttling_exception.ThrottlingException: <p>The request was denied due to throttling: the data speed and rendering may be limited depending on various parameters and conditions.</p>
        capo_b2bi.errors.validation_exception.ValidationException: <p>Occurs when a B2BI object cannot be validated against a request from another object. This exception can be thrown during standard EDI validation or when custom validation rules fail, such as when element length constraints are violated, invalid codes are used in code list validations, or required elements are missing based on configured element requirement rules.</p>
        capo_b2bi.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Sample UpdatePartnership call

        >>> client.update_partnership(capabilities=['ca-963a8121e4fc4e348'], name='b2bipartner', partnership_id='ps-219fa02f5b4242af8')
    """

    def _handler(
        req: "OperationRequest[capo_b2bi.types.update_partnership_request.UpdatePartnershipRequest]",
    ) -> OperationResponse[
        "capo_b2bi.types.update_partnership_response.UpdatePartnershipResponse"
    ]:
        import capo_b2bi._operations.b2_bi.update_partnership

        output, http_response = (
            capo_b2bi._operations.b2_bi.update_partnership.update_partnership(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_b2bi.types.update_partnership_response.UpdatePartnershipResponse",
    ) -> dict[str, Any]:
        import capo_b2bi.types.update_partnership_response

        return capo_b2bi.types.update_partnership_response.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UpdatePartnership", redact_output=_redact_output),
    )
    input_: capo_b2bi.types.update_partnership_request.UpdatePartnershipRequest = {
        "partnership_id": partnership_id
    }
    if name is not None:
        input_["name"] = name
    if capabilities is not None:
        input_["capabilities"] = capabilities
    if capability_options is not None:
        input_["capability_options"] = capability_options

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