HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/current/help/man/man1/gcloud_storage_objects_compose.1
.TH "GCLOUD_STORAGE_OBJECTS_COMPOSE" 1



.SH "NAME"
.HP
gcloud storage objects compose \- concatenate a sequence of objects into a new composite object



.SH "SYNOPSIS"
.HP
\f5gcloud storage objects compose\fR \fISOURCE\fR [\fISOURCE\fR\ ...] \fIDESTINATION\fR [\fB\-\-additional\-headers\fR=\fIHEADER\fR=\fIVALUE\fR] [\fB\-\-if\-generation\-match\fR=\fIGENERATION\fR\ \fB\-\-if\-metageneration\-match\fR=\fIMETAGENERATION\fR] [\fB\-\-retain\-until\fR=\fIDATETIME\fR\ \fB\-\-retention\-mode\fR=\fIRETENTION_MODE\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

gcloud storage objects compose creates a new object whose content is the
concatenation of a given sequence of source objects in the same bucket. For more
information, please see: composite objects documentation
(https://cloud.google.com/storage/docs/composite\-objects).

There is a limit (currently 32) to the number of components that can be composed
in a single operation.



.SH "EXAMPLES"

The following command creates a new object \f5target.txt\fR by concatenating
\f5a.txt\fR and \f5b.txt\fR:

.RS 2m
$ gcloud storage objects compose gs://bucket/a.txt \e
    gs://bucket/b.txt gs://bucket/target.txt
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
\fISOURCE\fR [\fISOURCE\fR ...]

The list of source objects that will be concatenated into a single object.

.TP 2m
\fIDESTINATION\fR

The destination object.


.RE
.sp

.SH "FLAGS"

.RS 2m
.TP 2m
\fB\-\-additional\-headers\fR=\fIHEADER\fR=\fIVALUE\fR

Includes arbitrary headers in storage API calls. Accepts a comma separated list
of key=value pairs, e.g. \f5header1=value1,header2=value2\fR. Overrides the
default \fBstorage/additional_headers\fR property value for this command
invocation.


.RE
.sp

.SH "PRECONDITION FLAGS"

.RS 2m
.TP 2m
\fB\-\-if\-generation\-match\fR=\fIGENERATION\fR

Execute only if the generation matches the generation of the requested object.

.TP 2m
\fB\-\-if\-metageneration\-match\fR=\fIMETAGENERATION\fR

Execute only if the metageneration matches the metageneration of the requested
object.


.RE
.sp

.SH "RETENTION FLAGS"

.RS 2m
.TP 2m
\fB\-\-retain\-until\fR=\fIDATETIME\fR

Ensures the destination object is retained until the specified time in RFC 3339
format.

.TP 2m
\fB\-\-retention\-mode\fR=\fIRETENTION_MODE\fR

Sets the destination object retention mode to either "Locked" or "Unlocked".
When retention mode is "Locked", the retain until time can only be increased.
\fIRETENTION_MODE\fR must be one of: \fBLocked\fR, \fBUnlocked\fR.


.RE
.sp

.SH "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 \fB$ gcloud help\fR for details.



.SH "NOTES"

This variant is also available:

.RS 2m
$ gcloud alpha storage objects compose
.RE