gdcloud storage buckets update

NAME

gdcloud storage buckets update - Update storage buckets.

SYNOPSIS

gdcloud storage buckets update [ BUCKET_NAME ...]
    --location=location
    --location-type
    --bucket-file=BUCKET_FILE |
    ( [--description=description]
    [--project=project-id]
    [--labels=key1=value1,key2=value2] | [--labels-file=LABELS_FILE] | [--update-labels=key1=value1,key2=value2]
    [--annotations=key1=value1,key2=value2] | [--annotations-file=ANNOTATIONS_FILE] | [--update-annotations=key1=value1,key2=value2]
    [--finalizers=value1,value2] | [--update-finalizers=value1,value2]
    [--retention-days=value]
    [--enable-cors-policy=bool]
    [--cors-rules-file=CORS_RULES_FILE]
    [--enable-life-cycle-policy=bool]
    [--life-cycle-rules-file=LIFE_CYCLE_RULES_FILE ]) [flags]

DESCRIPTION

Update buckets for storing objects.

EXAMPLES

The following command updates a zonal bucket named my-zonal-bucket:

    gdcloud storage buckets update my-zonal-bucket \
        --retention-days=120 \
        --enable-cors-policy=true \
        --cors-rules-file=corsRulesFilePath \
        --enable-life-cycle-policy=true \
        --life-cycle-rules-file=lifeCycleRulesFilePath \
        --location=zone1 \
        --location-type=SingleZone

The following command updates a dual-zone bucket named my-dual-zone-bucket:

    gdcloud storage buckets update my-dual-zone-bucket \
        --retention-days=120 \
        --enable-cors-policy=true \
        --cors-rules-file=corsRulesFilePath \
        --enable-life-cycle-policy=true \
        --life-cycle-rules-file=lifeCycleRulesFilePath \
        --location=zone1,zone2 \
        --location-type=AsyncDualZone

The following command updates a zonal bucket from a file containing YAML configuration for the bucket:

    gdcloud storage buckets update --bucket-file=BUCKET_FILE --location=zone1 --location-type=SingleZone

The following command updates a dual-zone bucket from a file containing YAML configuration for the bucket:

    gdcloud storage buckets update --bucket-file=BUCKET_FILE --location=zone1,zone2 --location-type=AsyncDualZone

REQUIRED FLAGS

      --location string        Comma-separated list of zones where the storage buckets are available.
      --location-type string   Bucket location configuration type. Available options are: [AsyncDualZone, SyncDualZone, SingleZone].

OPTIONAL FLAGS

      --annotations stringToString          Comma-separated list of key-value pairs for annotations. Existing annotations not specified with this flag will be deleted. (default [])
      --annotations-file string             Path to a file containing YAML configuration for annotations. Existing annotations not specified with this flag will be deleted.
      --bucket-file string                  Path to a file containing YAML configuration for a bucket custom resource.
                                            If set, the gdcloud CLI updates the bucket from the YAML configuration and ignores the other flags that define the bucket API field.
      --cors-rules-file string              Path to a file containing YAML configuration for the CORS policy detail. It must contain an array of CORS rules.
      --description string                  String description of bucket contents.
      --enable-cors-policy                  If set, the custom policy defined in CORS_FILE takes effect.
                                            Otherwise, CORS_FILE is ignored even if it has been set.
                                            (default is false).
      --enable-life-cycle-policy            If set, the custom policy defined in LIFE_CYCLE_RULES_FILE takes effect.
                                            Otherwise, LIFE_CYCLE_RULES_FILE is ignored even if it has been set.
                                            (default is false).
      --finalizers strings                  Comma-separated list of strings for finalizers. Existing finalizers not specified with this flag will be deleted.
      --labels stringToString               Comma-separated list of key-value pairs for labels. Existing labels not specified with this flag will be deleted. (default [])
      --labels-file string                  Path to a file containing YAML configuration for labels. Existing labels not specified with this flag will be deleted.
      --life-cycle-rules-file string        Path to a file containing YAML configuration for the life cycle policy detail. It must contain an array of life cycle rules.
      --log-http                            Log all HTTP server requests and responses to stderr.
      --retention-days int32                Minimum number of days as an integer that each version of every object will be retained. (default -2147483648)
      --update-annotations stringToString   Comma-separated list of key-value pairs for annotations to add or set. Existing annotations not specified with this flag are not changed. (default [])
      --update-finalizers strings           Comma-separated list of strings for finalizers to add or set. Existing finalizers not specified with this flag are not changed.
      --update-labels stringToString        Comma-separated list of key-value pairs for labels to add or set. Existing labels not specified with this flag are not changed. (default [])

GDCLOUD WIDE FLAGS

These flags are available to all commands: --configuration, --format, --help, --project, --quiet.

For more information, see the gdcloud CLI reference overview page.