.. _mongocli-ops-manager-standby-clusters-configure:

===============================================
mongocli ops-manager standby-clusters configure
===============================================

.. default-domain:: mongodb

.. contents:: On this page
   :local:
   :backlinks: none
   :depth: 1
   :class: singlecol

Configure access to the disaster recovery state file of your standby cluster.

Guides you through setting up access to the standby cluster disaster
recovery (DR) state file in blob storage: Amazon S3 (the default) or Azure
Blob Storage.

For S3 you configure the bucket, object key, region, and AWS credentials:
static AWS access keys, IAM role assumption, or the default AWS credentials
chain (environment variables, ~/.aws, instance profiles, and AWS SSO after
'aws sso login').

For Azure you configure the storage account, container, object key, and the
storage account access key.

The settings are stored in your mongocli profile. All values can also be
provided as flags or MCLI_* environment variables for scripted setup.

Syntax
------

.. code-block::
   :caption: Command Syntax

   mongocli ops-manager standby-clusters configure [options]

.. Code end marker, please don't delete this comment

Options
-------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - --awsAccessKey
     - string
     - false
     - AWS Access Key ID that can access the Amazon S3 bucket specified in s3BucketName.
   * - --awsAuthMode
     - string
     - false
     - AWS authentication mode for standby cluster commands. Valid values are staticCredentials, assumeRole, or credentialsChain.
   * - --awsProfile
     - string
     - false
     - Named AWS profile from the shared AWS config files to use with the default credentials chain, including AWS SSO profiles after aws sso login.
   * - --awsRegion
     - string
     - false
     - AWS region of the Amazon S3 bucket that holds the standby cluster DR state file. Defaults to us-east-1; any value works for S3-compatible stores.
   * - --awsRoleArn
     - string
     - false
     - AWS IAM role ARN to assume for standby cluster commands. Required when awsAuthMode is assumeRole.
   * - --awsSecretKey
     - string
     - false
     - AWS Secret Access Key that can access the Amazon S3 bucket specified in s3BucketName.
   * - --azureAccessKey
     - string
     - false
     - Azure storage account access key that can access the container specified in azureContainerName.
   * - --azureAccountName
     - string
     - false
     - Name of the Azure storage account that holds the standby cluster DR state file.
   * - --azureContainerName
     - string
     - false
     - Name of the Azure Blob container that holds the standby cluster DR state file.
   * - --azureEndpoint
     - string
     - false
     - URL of a custom Azure Blob endpoint for the standby cluster DR state file. Use only for emulators such as Azurite or non-public-cloud endpoints.
   * - -h, --help
     - 
     - false
     - help for configure
   * - --provider
     - string
     - false
     - Cloud provider hosting the standby cluster DR state file. Valid values are aws or azure. Defaults to aws.
   * - --s3BucketEndpoint
     - string
     - false
     - URL of an S3-compatible endpoint for the standby cluster DR state file. Use only for S3-compatible stores.
   * - --s3BucketName
     - string
     - false
     - Name of the Amazon S3 bucket that holds the standby cluster DR state file.
   * - --stateFileKey
     - string
     - false
     - Object key of the standby cluster DR state file in the bucket or container, for example <clusterPrefix>/dr_status_<componentId>.json.

Inherited Options
-----------------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - -P, --profile
     - string
     - false
     - Name of the profile to use from your configuration file. To learn about profiles for MongoCLI, see https://dochub.mongodb.org/core/atlas-cli-configuration-file.

Examples
--------

.. code-block::
   :copyable: false

   # Configure access to the DR state file interactively:
   mongocli ops-manager standby-clusters configure

   
.. code-block::
   :copyable: false

   # Configure with static AWS credentials, no prompts:
   mongocli ops-manager standby-clusters configure \
     --s3BucketName my-dr-bucket \
     --stateFileKey my-cluster/dr_status_my-cluster.json \
     --awsRegion us-east-1 \
     --awsAuthMode staticCredentials \
     --awsAccessKey AKIA... --awsSecretKey ...

   
.. code-block::
   :copyable: false

   # Configure for Azure Blob Storage, no prompts:
   mongocli ops-manager standby-clusters configure \
     --provider azure \
     --azureAccountName mydraccount \
     --azureContainerName my-dr-container \
     --azureAccessKey ... \
     --stateFileKey my-cluster/dr_status_my-cluster.json
