Skip to content

update_snapmirror_relationship

update_snapmirror_relationship(
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    client_request_token: Optional[ClientRequestToken] = None,
    snapmirror_relationship_id: Optional[SnapmirrorRelationshipId] = None,
    policy_id: Optional[SnapmirrorPolicyId] = None,
    transfer_schedule: Optional[SnapmirrorTransferScheduleName] = None,
    throttle_in_kbps: Optional[ThrottleInKbps] = None,
    state: Optional[UpdatableSnapmirrorRelationshipState] = None,
) -> UpdateSnapmirrorRelationshipResponse

Updates an Amazon FSx for NetApp ONTAP SnapMirror relationship.

Parameters:

  • snapmirror_relationship_id (Optional[SnapmirrorRelationshipId], default: None ) –

    The ID of the SnapMirror relationship that you want to update.

  • policy_id (Optional[SnapmirrorPolicyId], default: None ) –

    Specifies the ID of the SnapMirror policy that the SnapMirror relationship uses.

  • transfer_schedule (Optional[SnapmirrorTransferScheduleName], default: None ) –

    Specifies the name of the ONTAP schedule that determines when SnapMirror transfers data for the relationship. This schedule overrides the transfer schedule of the SnapMirror policy.

  • throttle_in_kbps (Optional[ThrottleInKbps], default: None ) –

    Specifies the maximum bandwidth, in kilobytes per second (KBps), that SnapMirror uses to transfer data for the relationship. A value of 0 means that the bandwidth is unlimited. This value overrides the throttle of the SnapMirror policy.

  • state (Optional[UpdatableSnapmirrorRelationshipState], default: None ) –

    Specifies the state to set for the SnapMirror relationship:

    • SNAPMIRRORED – Resumes a paused SnapMirror relationship, or resynchronizes a broken-off SnapMirror relationship.

    • PAUSED – Pauses SnapMirror transfers for the relationship.

    • BROKEN_OFF – Breaks off the SnapMirror relationship, which makes the destination volume writable.

    Setting State to SNAPMIRRORED on a relationship that is BROKEN_OFF might resynchronize the relationship. A resync overwrites the destination volume with data from the source volume, and discards any data written to the destination volume that isn't present on the source volume. Use caution when you resynchronize a relationship.

Raises:

  • BadRequest –

    A generic error indicating a failure with a client request.

  • IncompatibleParameterError –

    The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.

  • InternalServerError –

    A generic error indicating a server-side failure.

  • SnapmirrorRelationshipNotFound –

    No Amazon FSx SnapMirror relationships were found based on the supplied parameters.

  • UnknownServiceError –

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

Source code in docs_src/capo_fsx/_services/f_sx.py
def update_snapmirror_relationship(
    self,
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    client_request_token: Optional[
        "capo_fsx.types.client_request_token.ClientRequestToken"
    ] = None,
    snapmirror_relationship_id: Optional[
        "capo_fsx.types.snapmirror_relationship_id.SnapmirrorRelationshipId"
    ] = None,
    policy_id: Optional[
        "capo_fsx.types.snapmirror_policy_id.SnapmirrorPolicyId"
    ] = None,
    transfer_schedule: Optional[
        "capo_fsx.types.snapmirror_transfer_schedule_name.SnapmirrorTransferScheduleName"
    ] = None,
    throttle_in_kbps: Optional[
        "capo_fsx.types.throttle_in_kbps.ThrottleInKbps"
    ] = None,
    state: Optional[
        "capo_fsx.types.updatable_snapmirror_relationship_state.UpdatableSnapmirrorRelationshipState"
    ] = None,
) -> "capo_fsx.types.update_snapmirror_relationship_response.UpdateSnapmirrorRelationshipResponse":
    """<p>Updates an Amazon FSx for NetApp ONTAP SnapMirror relationship.</p>

    Args:
        snapmirror_relationship_id: <p>The ID of the SnapMirror relationship that you want to update.</p>
        policy_id: <p>Specifies the ID of the SnapMirror policy that the SnapMirror relationship uses.</p>
        transfer_schedule: <p>Specifies the name of the ONTAP schedule that determines when SnapMirror transfers data for the relationship. This schedule overrides the transfer schedule of the SnapMirror policy.</p>
        throttle_in_kbps: <p>Specifies the maximum bandwidth, in kilobytes per second (KBps), that SnapMirror uses to transfer data for the relationship. A value of <code>0</code> means that the bandwidth is unlimited. This value overrides the throttle of the SnapMirror policy.</p>
        state: <p>Specifies the state to set for the SnapMirror relationship:</p> <ul> <li> <p> <code>SNAPMIRRORED</code> – Resumes a paused SnapMirror relationship, or resynchronizes a broken-off SnapMirror relationship.</p> </li> <li> <p> <code>PAUSED</code> – Pauses SnapMirror transfers for the relationship.</p> </li> <li> <p> <code>BROKEN_OFF</code> – Breaks off the SnapMirror relationship, which makes the destination volume writable.</p> </li> </ul> <important> <p>Setting <code>State</code> to <code>SNAPMIRRORED</code> on a relationship that is <code>BROKEN_OFF</code> might resynchronize the relationship. A resync overwrites the destination volume with data from the source volume, and discards any data written to the destination volume that isn't present on the source volume. Use caution when you resynchronize a relationship.</p> </important>

    Raises:
        capo_fsx.errors.bad_request.BadRequest: <p>A generic error indicating a failure with a client request.</p>
        capo_fsx.errors.incompatible_parameter_error.IncompatibleParameterError: <p>The error returned when a second request is received with the same client request token but different parameters settings. A client request token should always uniquely identify a single request.</p>
        capo_fsx.errors.internal_server_error.InternalServerError: <p>A generic error indicating a server-side failure.</p>
        capo_fsx.errors.snapmirror_relationship_not_found.SnapmirrorRelationshipNotFound: <p>No Amazon FSx SnapMirror relationships were found based on the supplied parameters.</p>
        capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fsx.types.update_snapmirror_relationship_request.UpdateSnapmirrorRelationshipRequest]",
    ) -> OperationResponse[
        "capo_fsx.types.update_snapmirror_relationship_response.UpdateSnapmirrorRelationshipResponse"
    ]:
        import capo_fsx._operations.aws_simba_api_service_v20180301.update_snapmirror_relationship

        output, http_response = (
            capo_fsx._operations.aws_simba_api_service_v20180301.update_snapmirror_relationship.update_snapmirror_relationship(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSnapmirrorRelationship")
    )
    input_: capo_fsx.types.update_snapmirror_relationship_request.UpdateSnapmirrorRelationshipRequest = {}
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token
    if snapmirror_relationship_id is not None:
        input_["snapmirror_relationship_id"] = snapmirror_relationship_id
    if policy_id is not None:
        input_["policy_id"] = policy_id
    if transfer_schedule is not None:
        input_["transfer_schedule"] = transfer_schedule
    if throttle_in_kbps is not None:
        input_["throttle_in_kbps"] = throttle_in_kbps
    if state is not None:
        input_["state"] = state

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