File: //snap/google-cloud-cli/394/help/man/man1/gcloud_privateca_certificates_export.1
.TH "GCLOUD_PRIVATECA_CERTIFICATES_EXPORT" 1
.SH "NAME"
.HP
gcloud privateca certificates export \- export a pem\-encoded certificate to a file
.SH "SYNOPSIS"
.HP
\f5gcloud privateca certificates export\fR (\fICERTIFICATE\fR\ :\ \fB\-\-issuer\-location\fR=\fIISSUER_LOCATION\fR\ \fB\-\-issuer\-pool\fR=\fIISSUER_POOL\fR) \fB\-\-output\-file\fR=\fIOUTPUT_FILE\fR [\fB\-\-include\-chain\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]
.SH "EXAMPLES"
To export a single pem\-encoded certificate to a file, run the following:
.RS 2m
$ gcloud privateca certificates export my\-cert \e
\-\-issuer\-pool=my\-pool \-\-issuer\-location=us\-west1 \e
\-\-output\-file=cert.pem
.RE
To export a pem\-encoded certificate along with its issuing chain in the same
file, run the following:
.RS 2m
$ gcloud privateca certificates export my\-cert \e
\-\-issuer\-pool=my\-pool \-\-issuer\-location=us\-west1 \e
\-\-include\-chain \-\-output\-file=chain.pem
.RE
You can omit the \-\-issuer\-location flag in both of the above examples if
you've already set the privateca/location property. For example:
$ gcloud config set privateca/location us\-west1
.SH "The following is equivalent to the first example above."
.RS 2m
$ gcloud privateca certificates export my\-cert \e
\-\-issuer\-pool=my\-pool \-\-output\-file=cert.pem
.RE
.SH "The following is equivalent to the second example above."
.RS 2m
$ gcloud privateca certificates export my\-cert \e
\-\-issuer\-pool=my\-pool \-\-include\-chain \-\-output\-file=chain.pem
.RE
.SH "POSITIONAL ARGUMENTS"
.RS 2m
.TP 2m
CERTIFICATE resource \- The certificate to export. 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 \f5project\fR attribute:
.RS 2m
.IP "\(em" 2m
provide the argument \f5CERTIFICATE\fR on the command line with a fully
specified name;
.IP "\(em" 2m
provide the argument \f5\-\-project\fR on the command line;
.IP "\(em" 2m
set the property \f5core/project\fR.
.RE
.sp
This must be specified.
.RS 2m
.TP 2m
\fICERTIFICATE\fR
ID of the CERTIFICATE or fully qualified identifier for the CERTIFICATE.
To set the \f5certificate\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5CERTIFICATE\fR on the command line.
.RE
.sp
This positional argument must be specified if any of the other arguments in this
group are specified.
.TP 2m
\fB\-\-issuer\-location\fR=\fIISSUER_LOCATION\fR
The location of the CERTIFICATE.
To set the \f5issuer\-location\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5CERTIFICATE\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-issuer\-location\fR on the command line;
.IP "\(bu" 2m
set the property \f5privateca/location\fR.
.RE
.sp
.TP 2m
\fB\-\-issuer\-pool\fR=\fIISSUER_POOL\fR
The parent CA Pool of the CERTIFICATE.
To set the \f5issuer\-pool\fR attribute:
.RS 2m
.IP "\(bu" 2m
provide the argument \f5CERTIFICATE\fR on the command line with a fully
specified name;
.IP "\(bu" 2m
provide the argument \f5\-\-issuer\-pool\fR on the command line.
.RE
.sp
.RE
.RE
.sp
.SH "REQUIRED FLAGS"
.RS 2m
.TP 2m
\fB\-\-output\-file\fR=\fIOUTPUT_FILE\fR
The path where the resulting PEM\-encoded certificate will be written.
.RE
.sp
.SH "OPTIONAL FLAGS"
.RS 2m
.TP 2m
\fB\-\-include\-chain\fR
Whether to include the certificate's issuer chain in the exported file. If this
is set, the resulting file will contain the pem\-encoded certificate and its
issuing chain, ordered from leaf to root.
.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.