gcloud secrets enable-managed-rotation

INFORMATION
gcloud secrets enable-managed-rotation is supported in universe domain universe; however, some of the values used in the help text may not be available. Command examples may not work as-is and may requires changes before execution.
NAME
gcloud secrets enable-managed-rotation - enable managed rotation for a secret
SYNOPSIS
gcloud secrets enable-managed-rotation SECRET --location=LOCATION (--instance-id=INSTANCE_ID --username=USERNAME : --password=PASSWORD) [GCLOUD_WIDE_FLAG]
DESCRIPTION
Enable managed rotation for the specified secret. This command is used for the initial setup of managed rotation, currently supporting Cloud SQL single-user credentials.
EXAMPLES
To enable managed rotation for a secret my-secret targeting a Cloud SQL instance:
gcloud secrets enable-managed-rotation my-secret --location=us-central1 --instance-id=my-project:my-instance --username=db-user

To enable managed rotation and set an initial password:

gcloud secrets enable-managed-rotation my-secret --location=us-central1 --instance-id=my-project:my-instance --username=db-user --password="s3cr3tPassword"
POSITIONAL ARGUMENTS
Secret resource - The secret to enable managed rotation for. This represents a Cloud resource. (NOTE) Some attributes are not given arguments in this group but can be set in other ways.

To set the project attribute:

  • provide the argument SECRET on the command line with a fully specified name;
  • provide the argument --project on the command line;
  • set the property core/project.

This must be specified.

SECRET
ID of the secret or fully qualified identifier for the secret.

To set the secret attribute:

  • provide the argument SECRET on the command line.
REQUIRED FLAGS
Location resource - The location of the secret. This represents a Cloud resource. (NOTE) Some attributes are not given arguments in this group but can be set in other ways.

To set the project attribute:

  • provide the argument --location on the command line with a fully specified name;
  • provide the argument --project on the command line;
  • set the property core/project.

This must be specified.

--location=LOCATION
ID of the location or fully qualified identifier for the location.

To set the location attribute:

  • provide the argument --location on the command line.
Cloud SQL single-user credential settings.

This must be specified.

--instance-id=INSTANCE_ID
The Cloud SQL instance ID.

This flag argument must be specified if any of the other arguments in this group are specified.

--username=USERNAME
The database username.

This flag argument must be specified if any of the other arguments in this group are specified.

--password=PASSWORD
The initial password to set for the database user. If not provided, a random password will be generated.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.