Skip to content

create_cluster_peer

create_cluster_peer(
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    client_request_token: Optional[ClientRequestToken] = None,
    file_system_id: Optional[FileSystemId] = None,
    peer_addresses: Optional[PeerAddresses] = None,
    passphrase_secret_arn: Optional[CustomerSecretsManagerARN] = None,
    peer_cluster_name: Optional[PeerClusterName] = None,
    allowed_svm_mode: Optional[AllowedSvmMode] = None,
    allowed_svm_ids: Optional[AllowedSvmIds] = None,
    tags: Optional[Tags] = None,
) -> CreateClusterPeerResponse

Creates a cluster peer relationship between an Amazon FSx for NetApp ONTAP file system and another ONTAP cluster.

The CreateClusterPeer operation returns while the cluster peer's lifecycle state is still CREATING. You can check the cluster peer creation status by calling the DescribeClusterPeers operation.

Parameters:

  • file_system_id (Optional[FileSystemId], default: None ) –

    Specifies the ID of the Amazon FSx for NetApp ONTAP file system on which to create the cluster peer relationship.

  • peer_addresses (Optional[PeerAddresses], default: None ) –

    Specifies the IP addresses of the intercluster logical interfaces (LIFs) on the peer cluster.

  • passphrase_secret_arn (Optional[CustomerSecretsManagerARN], default: None ) –

    Specifies the Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret containing the cluster peering passphrase. Store the passphrase as a plaintext secret value, not as a key-value pair. The secret must be in the same Amazon Web Services Region as the file system. You must use the same passphrase when you create the cluster peer relationship on the peer cluster.

  • peer_cluster_name (Optional[PeerClusterName], default: None ) –

    Specifies the name that the file system uses to identify the peer cluster.

  • allowed_svm_mode (Optional[AllowedSvmMode], default: None ) –

    Specifies which SVMs on the file system are preauthorized for SVM peering with the peer cluster.

    • ALL – All SVMs on the file system are preauthorized. You can't specify AllowedSvmIds along with this property.

    • NONE – No SVMs on the file system are preauthorized. You can't specify AllowedSvmIds along with this property.

    • SPECIFIED – Only the SVMs in AllowedSvmIds are preauthorized. You must specify AllowedSvmIds along with this property.

  • allowed_svm_ids (Optional[AllowedSvmIds], default: None ) –

    Specifies the IDs of the SVMs on the file system that are preauthorized for SVM peering with the peer cluster. You can specify AllowedSvmIds only when AllowedSvmMode is SPECIFIED.

Raises:

  • BadRequest –

    A generic error indicating a failure with a client request.

  • FileSystemNotFound –

    No Amazon FSx file systems were found based upon supplied parameters.

  • 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.

  • ServiceLimitExceeded –

    An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting Amazon Web Services Support.

  • UnsupportedOperation –

    The requested operation is not supported for this resource or API.

  • UnknownServiceError –

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

Source code in docs_src/capo_fsx/_services/f_sx.py
def create_cluster_peer(
    self,
    *,
    config_overrides: Optional[FSxClientConfig] = None,
    client_request_token: Optional[
        "capo_fsx.types.client_request_token.ClientRequestToken"
    ] = None,
    file_system_id: Optional["capo_fsx.types.file_system_id.FileSystemId"] = None,
    peer_addresses: Optional["capo_fsx.types.peer_addresses.PeerAddresses"] = None,
    passphrase_secret_arn: Optional[
        "capo_fsx.types.customer_secrets_manager_arn.CustomerSecretsManagerARN"
    ] = None,
    peer_cluster_name: Optional[
        "capo_fsx.types.peer_cluster_name.PeerClusterName"
    ] = None,
    allowed_svm_mode: Optional[
        "capo_fsx.types.allowed_svm_mode.AllowedSvmMode"
    ] = None,
    allowed_svm_ids: Optional[
        "capo_fsx.types.allowed_svm_ids.AllowedSvmIds"
    ] = None,
    tags: Optional["capo_fsx.types.tags.Tags"] = None,
) -> "capo_fsx.types.create_cluster_peer_response.CreateClusterPeerResponse":
    """<p>Creates a cluster peer relationship between an Amazon FSx for NetApp ONTAP file system and another ONTAP cluster.</p> <p>The <code>CreateClusterPeer</code> operation returns while the cluster peer's lifecycle state is still <code>CREATING</code>. You can check the cluster peer creation status by calling the DescribeClusterPeers operation.</p>

    Args:
        file_system_id: <p>Specifies the ID of the Amazon FSx for NetApp ONTAP file system on which to create the cluster peer relationship.</p>
        peer_addresses: <p>Specifies the IP addresses of the intercluster logical interfaces (LIFs) on the peer cluster.</p>
        passphrase_secret_arn: <p>Specifies the Amazon Resource Name (ARN) of the Amazon Web Services Secrets Manager secret containing the cluster peering passphrase. Store the passphrase as a plaintext secret value, not as a key-value pair. The secret must be in the same Amazon Web Services Region as the file system. You must use the same passphrase when you create the cluster peer relationship on the peer cluster.</p>
        peer_cluster_name: <p>Specifies the name that the file system uses to identify the peer cluster.</p>
        allowed_svm_mode: <p>Specifies which SVMs on the file system are preauthorized for SVM peering with the peer cluster.</p> <ul> <li> <p> <code>ALL</code> – All SVMs on the file system are preauthorized. You can't specify <code>AllowedSvmIds</code> along with this property.</p> </li> <li> <p> <code>NONE</code> – No SVMs on the file system are preauthorized. You can't specify <code>AllowedSvmIds</code> along with this property.</p> </li> <li> <p> <code>SPECIFIED</code> – Only the SVMs in <code>AllowedSvmIds</code> are preauthorized. You must specify <code>AllowedSvmIds</code> along with this property.</p> </li> </ul>
        allowed_svm_ids: <p>Specifies the IDs of the SVMs on the file system that are preauthorized for SVM peering with the peer cluster. You can specify <code>AllowedSvmIds</code> only when <code>AllowedSvmMode</code> is <code>SPECIFIED</code>.</p>

    Raises:
        capo_fsx.errors.bad_request.BadRequest: <p>A generic error indicating a failure with a client request.</p>
        capo_fsx.errors.file_system_not_found.FileSystemNotFound: <p>No Amazon FSx file systems were found based upon supplied parameters.</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.service_limit_exceeded.ServiceLimitExceeded: <p>An error indicating that a particular service limit was exceeded. You can increase some service limits by contacting Amazon Web Services Support.</p>
        capo_fsx.errors.unsupported_operation.UnsupportedOperation: <p>The requested operation is not supported for this resource or API.</p>
        capo_fsx.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fsx.types.create_cluster_peer_request.CreateClusterPeerRequest]",
    ) -> OperationResponse[
        "capo_fsx.types.create_cluster_peer_response.CreateClusterPeerResponse"
    ]:
        import capo_fsx._operations.aws_simba_api_service_v20180301.create_cluster_peer

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateClusterPeer")
    )
    input_: capo_fsx.types.create_cluster_peer_request.CreateClusterPeerRequest = {}
    if client_request_token is None:
        client_request_token = str(uuid.uuid4())
    input_["client_request_token"] = client_request_token
    if file_system_id is not None:
        input_["file_system_id"] = file_system_id
    if peer_addresses is not None:
        input_["peer_addresses"] = peer_addresses
    if passphrase_secret_arn is not None:
        input_["passphrase_secret_arn"] = passphrase_secret_arn
    if peer_cluster_name is not None:
        input_["peer_cluster_name"] = peer_cluster_name
    if allowed_svm_mode is not None:
        input_["allowed_svm_mode"] = allowed_svm_mode
    if allowed_svm_ids is not None:
        input_["allowed_svm_ids"] = allowed_svm_ids
    if tags is not None:
        input_["tags"] = tags

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