Creates a CustomDomain
.
Scopes
You will need authorization for at least one of the following scopes to make a valid call:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/firebase
If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform.
You can set the scope for this method like this: firebasehosting1-beta1 --scope <scope> projects sites-custom-domains-create ...
Required Scalar Argument
- <parent> (string)
- Required. The custom domain's parent, specifically a Firebase Hosting
Site
.
- Required. The custom domain's parent, specifically a Firebase Hosting
Required Request Value
The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.
For example, a structure like this:
CustomDomain:
annotations: { string: string }
cert:
create-time: string
expire-time: string
state: string
type: string
verification:
dns:
check-time: string
http:
check-error:
code: integer
message: string
desired: string
discovered: string
last-check-time: string
path: string
cert-preference: string
create-time: string
delete-time: string
etag: string
expire-time: string
host-state: string
labels: { string: string }
name: string
ownership-state: string
reconciling: boolean
redirect-target: string
required-dns-updates:
check-time: string
update-time: string
can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.
-r . annotations=key=ea
- Annotations you can add to leave both human- and machine-readable metadata about your
CustomDomain
. - the value will be associated with the given
key
- Annotations you can add to leave both human- and machine-readable metadata about your
cert create-time=sadipscing
- Output only. The certificate's creation time. For
TEMPORARY
certs this is the time Hosting first generated challenges for your domain name. For all other cert types, it's the time the actual cert was created.
- Output only. The certificate's creation time. For
expire-time=lorem
- Output only. The certificate's expiration time. After this time, the cert can no longer be used to provide secure communication between Hosting and your site's visitors.
state=invidunt
- Output only. The state of the certificate. Only the
CERT_ACTIVE
andCERT_EXPIRING_SOON
states provide SSL coverage for a domain name. If the state isPROPAGATING
and Hosting had an active cert for the domain name before, that formerly-active cert provides SSL coverage for the domain name until the current cert propagates.
- Output only. The state of the certificate. Only the
type=no
- Output only. The certificate's type.
-
verification.dns check-time=est
- The last time Hosting checked your custom domain's DNS records.
-
..http.check-error code=74
- The status code, which should be an enum value of google.rpc.Code.
-
message=sed
- A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
-
.. desired=sit
- Output only. A text string to serve at the path.
discovered=et
- Output only. Whether Hosting was able to find the required file contents on the specified path during its last check.
last-check-time=tempor
- Output only. The last time Hosting systems checked for the file contents.
-
path=aliquyam
- Output only. The path to the file.
-
.... cert-preference=ipsum
- A field that lets you specify which SSL certificate type Hosting creates for your domain name. Spark plan custom domains only have access to the
GROUPED
cert type, while Blaze plan domains can select any option.
- A field that lets you specify which SSL certificate type Hosting creates for your domain name. Spark plan custom domains only have access to the
create-time=et
- Output only. The custom domain's create time.
delete-time=sanctus
- Output only. The time the
CustomDomain
was deleted; null for custom domains that haven't been deleted. Deleted custom domains persist for approximately 30 days, after which time Hosting removes them completely. To restore a deleted custom domain, make anUndeleteCustomDomain
request.
- Output only. The time the
etag=lorem
- Output only. A string that represents the current state of the
CustomDomain
and allows you to confirm its initial state in requests that would modify it. Use the tag to ensure consistency when makingUpdateCustomDomain
,DeleteCustomDomain
, andUndeleteCustomDomain
requests.
- Output only. A string that represents the current state of the
expire-time=est
- Output only. The minimum time before a soft-deleted
CustomDomain
is completely removed from Hosting; null for custom domains that haven't been deleted.
- Output only. The minimum time before a soft-deleted
host-state=sed
- Output only. The
HostState
of the domain name thisCustomDomain
refers to.
- Output only. The
labels=key=diam
- Labels used for extra metadata and/or filtering.
- the value will be associated with the given
key
name=dolores
- Output only. The fully-qualified name of the
CustomDomain
.
- Output only. The fully-qualified name of the
ownership-state=dolores
- Output only. The
OwnershipState
of the domain name thisCustomDomain
refers to.
- Output only. The
reconciling=true
- Output only. A field that, if true, indicates that Hosting's systems are attmepting to make the custom domain's state match your preferred state. This is most frequently
true
when initially provisioning aCustomDomain
after aCreateCustomDomain
request or when creating a new SSL certificate to match an updatedcert_preference
after anUpdateCustomDomain
request.
- Output only. A field that, if true, indicates that Hosting's systems are attmepting to make the custom domain's state match your preferred state. This is most frequently
redirect-target=sed
- A domain name that this
CustomDomain
should direct traffic towards. If specified, Hosting will respond to requests against this custom domain with an HTTP 301 code, and route traffic to the specifiedredirect_target
instead.
- A domain name that this
-
required-dns-updates check-time=no
- The last time Hosting checked your custom domain's DNS records.
-
.. update-time=et
- Output only. The last time the
CustomDomain
was updated.
- Output only. The last time the
About Cursors
The cursor position is key to comfortably set complex nested structures. The following rules apply:
- The cursor position is always set relative to the current one, unless the field name starts with the
.
character. Fields can be nested such as in-r f.s.o
. - The cursor position is set relative to the top-level structure if it starts with
.
, e.g.-r .s.s
- You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify
-r struct.sub_struct=bar
. - You can move the cursor one level up by using
..
. Each additional.
moves it up one additional level. E.g....
would go three levels up.
Optional Output Flags
The method's return value a JSON encoded structure, which will be written to standard output by default.
- -o out
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
-
to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.
- out specifies the destination to which to write the server's result to.
It will be a JSON-encoded structure.
The destination may be
Optional Method Properties
You may set the following properties to further configure the call. Please note that -p
is followed by one
or more key-value-pairs, and is called like this -p k1=v1 k2=v2
even though the listing below repeats the
-p
for completeness.
-
-p custom-domain-id=string
- Required. The ID of the
CustomDomain
, which is the domain name you'd like to use with Firebase Hosting.
- Required. The ID of the
-
-p validate-only=boolean
- If true, Hosting validates that it's possible to complete your request but doesn't actually create a new
CustomDomain
.
- If true, Hosting validates that it's possible to complete your request but doesn't actually create a new
Optional General Properties
The following properties can configure any call, and are not specific to this method.
-
-p $-xgafv=string
- V1 error format.
-
-p access-token=string
- OAuth access token.
-
-p alt=string
- Data format for response.
-
-p callback=string
- JSONP
-
-p fields=string
- Selector specifying which fields to include in a partial response.
-
-p key=string
- API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
-
-p oauth-token=string
- OAuth 2.0 token for the current user.
-
-p pretty-print=boolean
- Returns response with indentations and line breaks.
-
-p quota-user=string
- Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
-
-p upload-type=string
- Legacy upload protocol for media (e.g. "media", "multipart").
-
-p upload-protocol=string
- Upload protocol for media (e.g. "raw", "multipart").