The following command creates a bucket named my-bucket under the default project:
gdcloud storage buckets create my-bucket
The following command creates two buckets, one named my-bucket and a second bucket named my-other-bucket:
gdcloud storage buckets create my-bucket my-other-bucket
The following command creates a bucket with the Standard storage class in a project with ID my-project-id:
gdcloud storage buckets create my-bucket --storage-class=Standard --project=my-project-id
The following command creates a bucket from a file containing YAML configuration for the bucket. Flags other than --bucket-file are ignored when creating a bucket:
gdcloud storage buckets create --bucket-file=BUCKET_FILE
OPTIONALE FLAGS
--annotations stringToString Comma-separated list of key-value pairs for annotations. (default [])
--annotations-file string Path to a file containing YAML configuration for annotations.
--api-version string API version for the bucket (default is the newest API version).
--bucket-file string Path to a file containing YAML configuration for a bucket custom resource. If set, the gdcloud CLI creates
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-locking-policy Locking policy that must be enabled when creating the bucket and cannot be disabled afterwards.
If unset, object locking and versioning is disabled and cannot be enabled. The locking policy does not have a default amount of retention days. Use the --retention-days flag to set the retention days.
--finalizers strings Comma-separated list of strings for finalizers.
--labels stringToString Comma-separated list of key-value pairs for labels. (default [])
--labels-file string Path to a file containing YAML configuration for labels.
--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.
If set, the locking policy controlled by the --enable-locking-policy flag is enabled by default. (default -2147483648)
--storage-class string Storage class of the bucket. The available value is "Standard". (default "Standard")
GDCLOUD-WEITE FLAGS
Diese Flags sind für alle Befehle verfügbar: --configuration, --format, --help, --project, --quiet.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-04 (UTC)."],[[["\u003cp\u003eThe \u003ccode\u003egdcloud storage buckets create\u003c/code\u003e command is used to create new storage buckets.\u003c/p\u003e\n"],["\u003cp\u003eYou can create multiple buckets at once by listing their names, or create a single bucket from a YAML configuration file specified by \u003ccode\u003e--bucket-file\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eBuckets can be customized with settings such as storage class, project ID, descriptions, labels, annotations, finalizers, retention days, and enabling/disabling of the locking policy.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--enable-locking-policy\u003c/code\u003e flag enables a locking policy that cannot be disabled, and you must use \u003ccode\u003e--retention-days\u003c/code\u003e to set the retention period.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e--cors-rules-file\u003c/code\u003e flag allow you to use a custom CORS policy specified on the provided file.\u003c/p\u003e\n"]]],[],null,["# gdcloud storage buckets create\n\nNAME\n----\n\ngdcloud storage buckets create - Create new storage buckets.\n\nSYNOPSIS\n--------\n\n gdcloud storage buckets create [ BUCKET_NAME ...]\n --bucket-file=BUCKET_FILE |\n ( [--description=DESCRIPTION]\n [--storage-class=STORAGE_CLASS]\n [--project=PROJECT_ID]\n [--api-version=VERSION]\n [--labels=key1=value1,key2=value2 | --labels-file=LABELS_FILE]\n [--annotations=value1,key2=value2 | --annotations-file=ANNOTATIONS_FILE]\n [--finalizers=value1,value2]\n [--enable-locking-policy]\n [--retention-days=RETENTION_DAYS]\n [--enable-cors-policy=bool]\n [--cors-file=CORS_FILE] )\n [--format=FORMAT]\n [--log-http] [flags]\n\nDESCRIPTION\n-----------\n\nCreate buckets for storing objects.\n\n### EXAMPLES\n\n The following command creates a bucket named my-bucket under the default project:\n\n gdcloud storage buckets create my-bucket\n\n The following command creates two buckets, one named my-bucket and a second bucket named my-other-bucket:\n\n gdcloud storage buckets create my-bucket my-other-bucket\n\n The following command creates a bucket with the Standard storage class in a project with ID my-project-id:\n\n gdcloud storage buckets create my-bucket --storage-class=Standard --project=my-project-id\n\n The following command creates a bucket from a file containing YAML configuration for the bucket. Flags other than --bucket-file are ignored when creating a bucket:\n\n gdcloud storage buckets create --bucket-file=BUCKET_FILE\n\n### OPTIONAL FLAGS\n\n --annotations stringToString Comma-separated list of key-value pairs for annotations. (default [])\n --annotations-file string Path to a file containing YAML configuration for annotations.\n --api-version string API version for the bucket (default is the newest API version).\n --bucket-file string Path to a file containing YAML configuration for a bucket custom resource. If set, the gdcloud CLI creates\n the bucket from the YAML configuration and ignores the other flags that define the bucket API field.\n --cors-rules-file string Path to a file containing YAML configuration for the CORS policy detail. It must contain an array of CORS rules.\n --description string String description of bucket contents.\n --enable-cors-policy If set, the custom policy defined in CORS_FILE takes effect.\n Otherwise, CORS_FILE is ignored even if it has been set.\n (default is false).\n --enable-locking-policy Locking policy that must be enabled when creating the bucket and cannot be disabled afterwards.\n If unset, object locking and versioning is disabled and cannot be enabled. The locking policy does not have a default amount of retention days. Use the --retention-days flag to set the retention days.\n --finalizers strings Comma-separated list of strings for finalizers.\n --labels stringToString Comma-separated list of key-value pairs for labels. (default [])\n --labels-file string Path to a file containing YAML configuration for labels.\n --log-http Log all HTTP server requests and responses to stderr.\n --retention-days int32 Minimum number of days as an integer that each version of every object will be retained.\n If set, the locking policy controlled by the --enable-locking-policy flag is enabled by default. (default -2147483648)\n --storage-class string Storage class of the bucket. The available value is \"Standard\". (default \"Standard\")\n\n### GDCLOUD WIDE FLAGS\n\nThese flags are available to all commands: `--configuration`, `--format`, `--help`, `--project`, `--quiet`.\n\nFor more information, see the [gdcloud CLI reference overview](/distributed-cloud/hosted/docs/latest/gdch/resources/gdcloud-reference/gdcloud) page."]]