1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-18 14:56:05 +00:00

gcloud: Wed Apr 6 08:36:53 UTC 2022

This commit is contained in:
Automated 2022-04-06 08:36:53 +00:00
parent 9bf28f1efe
commit f88a614da8
221 changed files with 7174 additions and 449 deletions

View file

@ -5,10 +5,12 @@ NAME
SYNOPSIS
gcloud spanner backups add-iam-policy-binding
(BACKUP : --instance=INSTANCE) --member=PRINCIPAL --role=ROLE
[GCLOUD_WIDE_FLAG ...]
[--condition=[KEY=VALUE,...]
| --condition-from-file=CONDITION_FROM_FILE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Add an IAM policy binding to a Cloud Spanner backup.
Add an IAM policy binding to a Cloud Spanner backup. One binding consists
of a member, a role, and an optional condition.
EXAMPLES
To add an IAM policy binding for the role of 'roles/spanner.backupAdmin'
@ -20,6 +22,18 @@ EXAMPLES
--member='user:test-user@gmail.com' \
--role='roles/spanner.backupAdmin'
To add an IAM policy binding which expires at the end of the year 2018 for
the role of 'roles/spanner.backupAdmin' and the user 'test-user@gmail.com'
with backup 'example-backup' and instance 'example-instance', run:
$ gcloud spanner backups add-iam-policy-binding example-backup \
--instance='example-instance' \
--member='user:test-user@gmail.com' \
--role='roles/spanner.backupAdmin' \
--condition='expression=request.time <
timestamp("2019-01-01T00:00:00Z"),title=expires_end_of_2018,descrip\
tion=Expires at midnight on 2018-12-31'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
@ -73,6 +87,44 @@ REQUIRED FLAGS
for a custom role, such as
organizations/{ORGANIZATION_ID}/roles/logging.viewer.
OPTIONAL FLAGS
At most one of these can be specified:
--condition=[KEY=VALUE,...]
A condition to include in the binding. When the condition is
explicitly specified as None (--condition=None), a binding without a
condition is added. When the condition is specified and is not None,
--role cannot be a basic role. Basic roles are roles/editor,
roles/owner, and roles/viewer. For more on conditions, refer to the
conditions overview guide:
https://cloud.google.com/iam/docs/conditions-overview
When using the --condition flag, include the following key-value
pairs:
expression
(Required) Condition expression that evaluates to True or False.
This uses a subset of Common Expression Language syntax.
If the condition expression includes a comma, use a different
delimiter to separate the key-value pairs. Specify the delimiter
before listing the key-value pairs. For example, to specify a
colon (:) as the delimiter, do the following:
--condition=^:^title=TITLE:expression=EXPRESSION. For more
information, see
https://cloud.google.com/sdk/gcloud/reference/topic/escaping.
title
(Required) A short string describing the purpose of the
expression.
description
(Optional) Additional description for the expression.
--condition-from-file=CONDITION_FROM_FILE
Path to a local JSON or YAML file that defines the condition. To see
available fields, see the help for --condition.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,

168
gcloud/spanner/backups/copy Normal file
View file

@ -0,0 +1,168 @@
NAME
gcloud spanner backups copy - copies a backup of a Cloud Spanner database
SYNOPSIS
gcloud spanner backups copy
(--destination-backup=DESTINATION_BACKUP
: --destination-instance=DESTINATION_INSTANCE)
(--expiration-date=EXPIRATION_DATE
| --retention-period=RETENTION_PERIOD)
(--source-backup=SOURCE_BACKUP : --source-instance=SOURCE_INSTANCE)
[--async]
[--encryption-type=ENCRYPTION_TYPE [--kms-key=KMS_KEY
: --kms-keyring=KMS_KEYRING
--kms-location=KMS_LOCATION --kms-project=KMS_PROJECT]]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Copies a backup of a Cloud Spanner database.
EXAMPLES
To copy a backup within the same project, run:
$ gcloud spanner backups copy --source-instance=SOURCE_INSTANCE_ID \
--source-backup=SOURCE_BACKUP_ID \
--destination-instance=DESTINATION_INSTANCE_ID \
--destination-backup=DESTINATION_BACKUP_ID \
--expiration-date=2020-03-29T10:49:41Z
To copy a backup to a different project, run:
$ gcloud spanner backups copy \
--source-backup=projects/SOURCE_PROJECT_ID/instances/\
SOURCE_INSTANCE_ID/backups/SOURCE_BACKUP_ID \
--destination-backup=projects/DESTINATION_PROJECT_ID/instances/\
DESTINATION_INSTANCE_ID/backups/DESTINATION_BACKUP_ID \
--expiration-date=2020-03-29T10:49:41Z
REQUIRED FLAGS
Backup resource - TEXT The arguments in this group can be used to specify
the attributes of this 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 --destination-backup 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.
--destination-backup=DESTINATION_BACKUP
ID of the backup or fully qualified identifier for the backup. To set
the backup attribute:
▸ provide the argument --destination-backup on the command line.
This flag must be specified if any of the other arguments in this
group are specified.
--destination-instance=DESTINATION_INSTANCE
The Cloud Spanner instance for the backup. To set the instance
attribute:
▸ provide the argument --destination-backup on the command line
with a fully specified name;
▸ provide the argument --destination-instance on the command line;
▸ set the property spanner/instance.
Exactly one of these must be specified:
--expiration-date=EXPIRATION_DATE
Expiration time of the backup, must be at least 6 hours and at most
366 days from the time when the source backup is created. See $
gcloud topic datetimes for information on date/time formats.
--retention-period=RETENTION_PERIOD
Retention period of the backup relative from now, must be at least 6
hours and at most 366 days from the time when the source backup is
created. See $ gcloud topic datetimes for information on duration
formats.
Backup resource - TEXT The arguments in this group can be used to specify
the attributes of this 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 --source-backup 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.
--source-backup=SOURCE_BACKUP
ID of the backup or fully qualified identifier for the backup. To set
the backup attribute:
▸ provide the argument --source-backup on the command line.
This flag must be specified if any of the other arguments in this
group are specified.
--source-instance=SOURCE_INSTANCE
The Cloud Spanner instance for the backup. To set the instance
attribute:
▸ provide the argument --source-backup on the command line with a
fully specified name;
▸ provide the argument --source-instance on the command line;
▸ set the property spanner/instance.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
--encryption-type=ENCRYPTION_TYPE
The encryption type of the copied backup. ENCRYPTION_TYPE must be one
of:
customer-managed-encryption
Use the provided Cloud KMS key for encryption. If this option is
selected, kms-key must be set.
google-default-encryption
Use Google default encryption.
use-config-default-or-backup-encryption
Use the default encryption configuration if one exists. otherwise
use the same encryption configuration as the source backup.
Key resource - Cloud KMS key to be used to copy the Cloud Spanner backup.
The arguments in this group can be used to specify the attributes of this
resource.
--kms-key=KMS_KEY
ID of the key or fully qualified identifier for the key. To set the
kms-key attribute:
▸ provide the argument --kms-key on the command line.
This flag must be specified if any of the other arguments in this
group are specified.
--kms-keyring=KMS_KEYRING
KMS keyring id of the key. To set the kms-keyring attribute:
▸ provide the argument --kms-key on the command line with a fully
specified name;
▸ provide the argument --kms-keyring on the command line.
--kms-location=KMS_LOCATION
Cloud location for the key. To set the kms-location attribute:
▸ provide the argument --kms-key on the command line with a fully
specified name;
▸ provide the argument --kms-location on the command line.
--kms-project=KMS_PROJECT
Cloud project id for the key. To set the kms-project attribute:
▸ provide the argument --kms-key on the command line with a fully
specified name;
▸ provide the argument --kms-project on the command line.
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.
NOTES
These variants are also available:
$ gcloud alpha spanner backups copy
$ gcloud beta spanner backups copy

View file

@ -18,6 +18,9 @@ COMMANDS
add-iam-policy-binding
Add IAM policy binding to a Cloud Spanner backup.
copy
Copies a backup of a Cloud Spanner database.
create
Creates a backup of a Cloud Spanner database.

View file

@ -5,10 +5,12 @@ NAME
SYNOPSIS
gcloud spanner backups remove-iam-policy-binding
(BACKUP : --instance=INSTANCE) --member=PRINCIPAL --role=ROLE
[GCLOUD_WIDE_FLAG ...]
[--all | --condition=[KEY=VALUE,...]
| --condition-from-file=CONDITION_FROM_FILE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Remove an IAM policy binding of a Cloud Spanner backup.
Remove an IAM policy binding of a Cloud Spanner backup. One binding
consists of a member, a role, and an optional condition.
EXAMPLES
To remove an IAM policy binding for the role of 'roles/spanner.backupAdmin'
@ -20,6 +22,19 @@ EXAMPLES
--member='user:test-user@gmail.com' \
--role='roles/spanner.backupAdmin'
To remove an IAM policy binding which expires at the end of the year 2018
for the role of 'roles/spanner.backupAdmin' and the user
'test-user@gmail.com' with backup 'example-backup' and instance
'example-instance', run:
$ gcloud spanner backups remove-iam-policy-binding example-backup \
--instance='example-instance' \
--member='user:test-user@gmail.com' \
--role='roles/spanner.backupAdmin' \
--condition='expression=request.time <
timestamp("2019-01-01T00:00:00Z"),title=expires_end_of_2018,descrip\
tion=Expires at midnight on 2018-12-31'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
@ -75,6 +90,48 @@ REQUIRED FLAGS
--role=ROLE
The role to remove the principal from.
OPTIONAL FLAGS
At most one of these can be specified:
--all
Remove all bindings with this role and principal, irrespective of any
conditions.
--condition=[KEY=VALUE,...]
The condition of the binding that you want to remove. When the
condition is explicitly specified as None (--condition=None), a
binding without a condition is removed. Otherwise, only a binding
with a condition that exactly matches the specified condition
(including the optional description) is removed. For more on
conditions, refer to the conditions overview guide:
https://cloud.google.com/iam/docs/conditions-overview
When using the --condition flag, include the following key-value
pairs:
expression
(Required) Condition expression that evaluates to True or False.
This uses a subset of Common Expression Language syntax.
If the condition expression includes a comma, use a different
delimiter to separate the key-value pairs. Specify the delimiter
before listing the key-value pairs. For example, to specify a
colon (:) as the delimiter, do the following:
--condition=^:^title=TITLE:expression=EXPRESSION. For more
information, see
https://cloud.google.com/sdk/gcloud/reference/topic/escaping.
title
(Required) A short string describing the purpose of the
expression.
description
(Optional) Additional description for the expression.
--condition-from-file=CONDITION_FROM_FILE
Path to a local JSON or YAML file that defines the condition. To see
available fields, see the help for --condition.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,

View file

@ -5,10 +5,12 @@ NAME
SYNOPSIS
gcloud spanner databases add-iam-policy-binding
(DATABASE : --instance=INSTANCE) --member=PRINCIPAL --role=ROLE
[GCLOUD_WIDE_FLAG ...]
[--condition=[KEY=VALUE,...]
| --condition-from-file=CONDITION_FROM_FILE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Add an IAM policy binding to a Cloud Spanner database.
Add an IAM policy binding to a Cloud Spanner database. One binding consists
of a member, a role, and an optional condition.
EXAMPLES
To add an IAM policy binding for the role of 'roles/editor' for the user
@ -19,6 +21,18 @@ EXAMPLES
--instance='my-instance' --member='user:test-user@gmail.com' \
--role='roles/editor'
To add an IAM policy binding which expires at the end of the year 2018 for
the role of 'roles/spanner.databaseAdmin' and the user
'test-user@gmail.com' with database 'my-database' and instance
'my-instance', run:
$ gcloud spanner databases add-iam-policy-binding my-database \
--instance='my-instance' --member='user:test-user@gmail.com' \
--role='roles/spanner.databaseAdmin' \
--condition='expression=request.time <
timestamp("2019-01-01T00:00:00Z"),title=expires_end_of_2018,descrip\
tion=Expires at midnight on 2018-12-31'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
@ -73,6 +87,44 @@ REQUIRED FLAGS
for a custom role, such as
organizations/{ORGANIZATION_ID}/roles/logging.viewer.
OPTIONAL FLAGS
At most one of these can be specified:
--condition=[KEY=VALUE,...]
A condition to include in the binding. When the condition is
explicitly specified as None (--condition=None), a binding without a
condition is added. When the condition is specified and is not None,
--role cannot be a basic role. Basic roles are roles/editor,
roles/owner, and roles/viewer. For more on conditions, refer to the
conditions overview guide:
https://cloud.google.com/iam/docs/conditions-overview
When using the --condition flag, include the following key-value
pairs:
expression
(Required) Condition expression that evaluates to True or False.
This uses a subset of Common Expression Language syntax.
If the condition expression includes a comma, use a different
delimiter to separate the key-value pairs. Specify the delimiter
before listing the key-value pairs. For example, to specify a
colon (:) as the delimiter, do the following:
--condition=^:^title=TITLE:expression=EXPRESSION. For more
information, see
https://cloud.google.com/sdk/gcloud/reference/topic/escaping.
title
(Required) A short string describing the purpose of the
expression.
description
(Optional) Additional description for the expression.
--condition-from-file=CONDITION_FROM_FILE
Path to a local JSON or YAML file that defines the condition. To see
available fields, see the help for --condition.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,

View file

@ -5,13 +5,14 @@ NAME
SYNOPSIS
gcloud spanner databases remove-iam-policy-binding
(DATABASE : --instance=INSTANCE) --member=PRINCIPAL --role=ROLE
[GCLOUD_WIDE_FLAG ...]
[--all | --condition=[KEY=VALUE,...]
| --condition-from-file=CONDITION_FROM_FILE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Remove an IAM policy binding of a Cloud Spanner database.
EXAMPLES
To Remove an IAM policy binding for the role of 'roles/editor' for the user
To remove an IAM policy binding for the role of 'roles/editor' for the user
'test-user@gmail.com' with database 'my-database' and instance
'my-instance', run:
@ -19,6 +20,18 @@ EXAMPLES
--instance='my-instance' --member='user:test-user@gmail.com' \
--role='roles/editor'
To remove an IAM policy binding which expires at the end of the year 2018
for the role of 'roles/spanner.databaseAdmin' and the user
'test-user@gmail.com' with database 'my-database' and instance
'my-instance', run:
$ gcloud spanner databases remove-iam-policy-binding my-database \
--instance='my-instance' --member='user:test-user@gmail.com' \
--role='roles/spanner.databaseAdmin' \
--condition='expression=request.time <
timestamp("2019-01-01T00:00:00Z"),title=expires_end_of_2018,descrip\
tion=Expires at midnight on 2018-12-31'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
@ -74,6 +87,48 @@ REQUIRED FLAGS
--role=ROLE
The role to remove the principal from.
OPTIONAL FLAGS
At most one of these can be specified:
--all
Remove all bindings with this role and principal, irrespective of any
conditions.
--condition=[KEY=VALUE,...]
The condition of the binding that you want to remove. When the
condition is explicitly specified as None (--condition=None), a
binding without a condition is removed. Otherwise, only a binding
with a condition that exactly matches the specified condition
(including the optional description) is removed. For more on
conditions, refer to the conditions overview guide:
https://cloud.google.com/iam/docs/conditions-overview
When using the --condition flag, include the following key-value
pairs:
expression
(Required) Condition expression that evaluates to True or False.
This uses a subset of Common Expression Language syntax.
If the condition expression includes a comma, use a different
delimiter to separate the key-value pairs. Specify the delimiter
before listing the key-value pairs. For example, to specify a
colon (:) as the delimiter, do the following:
--condition=^:^title=TITLE:expression=EXPRESSION. For more
information, see
https://cloud.google.com/sdk/gcloud/reference/topic/escaping.
title
(Required) A short string describing the purpose of the
expression.
description
(Optional) Additional description for the expression.
--condition-from-file=CONDITION_FROM_FILE
Path to a local JSON or YAML file that defines the condition. To see
available fields, see the help for --condition.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,

View file

@ -4,10 +4,13 @@ NAME
SYNOPSIS
gcloud spanner instances add-iam-policy-binding [INSTANCE]
--member=PRINCIPAL --role=ROLE [GCLOUD_WIDE_FLAG ...]
--member=PRINCIPAL --role=ROLE
[--condition=[KEY=VALUE,...]
| --condition-from-file=CONDITION_FROM_FILE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Add an IAM policy binding to a Cloud Spanner instance.
Add an IAM policy binding to a Cloud Spanner instance. One binding consists
of a member, a role, and an optional condition.
EXAMPLES
To add an IAM policy binding for the role of 'roles/editor' for the user
@ -16,6 +19,17 @@ EXAMPLES
$ gcloud spanner instances add-iam-policy-binding my-instance \
--member='user:test-user@gmail.com' --role='roles/editor'
To add an IAM policy binding which expires at the end of the year 2018 for
the role of 'roles/spanner.admin' and the user 'test-user@gmail.com' with
instance 'my-instance', run:
$ gcloud spanner instances add-iam-policy-binding my-instance \
--member='user:test-user@gmail.com' \
--role='roles/spanner.admin' \
--condition='expression=request.time <
timestamp("2019-01-01T00:00:00Z"),title=expires_end_of_2018,descrip\
tion=Expires at midnight on 2018-12-31'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
@ -57,6 +71,44 @@ REQUIRED FLAGS
for a custom role, such as
organizations/{ORGANIZATION_ID}/roles/logging.viewer.
OPTIONAL FLAGS
At most one of these can be specified:
--condition=[KEY=VALUE,...]
A condition to include in the binding. When the condition is
explicitly specified as None (--condition=None), a binding without a
condition is added. When the condition is specified and is not None,
--role cannot be a basic role. Basic roles are roles/editor,
roles/owner, and roles/viewer. For more on conditions, refer to the
conditions overview guide:
https://cloud.google.com/iam/docs/conditions-overview
When using the --condition flag, include the following key-value
pairs:
expression
(Required) Condition expression that evaluates to True or False.
This uses a subset of Common Expression Language syntax.
If the condition expression includes a comma, use a different
delimiter to separate the key-value pairs. Specify the delimiter
before listing the key-value pairs. For example, to specify a
colon (:) as the delimiter, do the following:
--condition=^:^title=TITLE:expression=EXPRESSION. For more
information, see
https://cloud.google.com/sdk/gcloud/reference/topic/escaping.
title
(Required) A short string describing the purpose of the
expression.
description
(Optional) Additional description for the expression.
--condition-from-file=CONDITION_FROM_FILE
Path to a local JSON or YAML file that defines the condition. To see
available fields, see the help for --condition.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,

View file

@ -4,18 +4,32 @@ NAME
SYNOPSIS
gcloud spanner instances remove-iam-policy-binding [INSTANCE]
--member=PRINCIPAL --role=ROLE [GCLOUD_WIDE_FLAG ...]
--member=PRINCIPAL --role=ROLE
[--all | --condition=[KEY=VALUE,...]
| --condition-from-file=CONDITION_FROM_FILE] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
Remove an IAM policy binding of a Cloud Spanner instance.
Remove an IAM policy binding of a Cloud Spanner instance. One binding
consists of a member, a role, and an optional condition.
EXAMPLES
To Remove an IAM policy binding for the role of 'roles/editor' for the user
To remove an IAM policy binding for the role of 'roles/editor' for the user
'test-user@gmail.com' with instance 'my-instance', run:
$ gcloud spanner instances remove-iam-policy-binding my-instance \
--member='user:test-user@gmail.com' --role='roles/editor'
To remove an IAM policy binding which expires at the end of the year 2018
for the role of 'roles/spanner.admin' and the user 'test-user@gmail.com'
with instance 'my-instance', run:
$ gcloud spanner instances remove-iam-policy-binding my-instance \
--member='user:test-user@gmail.com' \
--role='roles/spanner.admin' \
--condition='expression=request.time <
timestamp("2019-01-01T00:00:00Z"),title=expires_end_of_2018,descrip\
tion=Expires at midnight on 2018-12-31'
See https://cloud.google.com/iam/docs/managing-policies for details of
policy role and member types.
@ -58,6 +72,48 @@ REQUIRED FLAGS
--role=ROLE
The role to remove the principal from.
OPTIONAL FLAGS
At most one of these can be specified:
--all
Remove all bindings with this role and principal, irrespective of any
conditions.
--condition=[KEY=VALUE,...]
The condition of the binding that you want to remove. When the
condition is explicitly specified as None (--condition=None), a
binding without a condition is removed. Otherwise, only a binding
with a condition that exactly matches the specified condition
(including the optional description) is removed. For more on
conditions, refer to the conditions overview guide:
https://cloud.google.com/iam/docs/conditions-overview
When using the --condition flag, include the following key-value
pairs:
expression
(Required) Condition expression that evaluates to True or False.
This uses a subset of Common Expression Language syntax.
If the condition expression includes a comma, use a different
delimiter to separate the key-value pairs. Specify the delimiter
before listing the key-value pairs. For example, to specify a
colon (:) as the delimiter, do the following:
--condition=^:^title=TITLE:expression=EXPRESSION. For more
information, see
https://cloud.google.com/sdk/gcloud/reference/topic/escaping.
title
(Required) A short string describing the purpose of the
expression.
description
(Optional) Additional description for the expression.
--condition-from-file=CONDITION_FROM_FILE
Path to a local JSON or YAML file that defines the condition. To see
available fields, see the help for --condition.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,