feat: Add new gcloud commands, API clients, and third-party libraries across various services.

This commit is contained in:
2026-01-01 20:26:35 +01:00
parent 5e23cbece0
commit a19e592eb7
25221 changed files with 8324611 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
# -*- coding: utf-8 -*- #
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Command group for Media CDN."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class EdgeCache(base.Group):
"""Manage Media CDN resources."""
category = base.NETWORKING_CATEGORY
detailed_help = {
"DESCRIPTION": "Manage Media CDN resources.",
"EXAMPLES":
"""
To list EdgeCacheService resources in the active Cloud Platform
project, run:
$ {command} services list
To create an EdgeCacheOrigin resource named 'my-origin' that
points to a Cloud Storage bucket, run:
$ {command} origins create my-origin --origin-address="gs://bucket"
To import an EdgeCacheService resource configuration from a YAML
definition, run:
$ {command} services import my-service --source=config.yaml
To describe an EdgeCacheKeyset resource named 'my-keyset', run:
$ {command} keysets describe my-keyset
"""
}
def Filter(self, context, args):
# TODO(b/190537939): Determine if command group works with project number
base.RequireProjectID(args)
del context, args

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*- #
# Copyright 2020 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The keysets command group for Media CDN."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class Keysets(base.Group):
"""Interact with and manage EdgeCacheKeyset resources."""

View File

@@ -0,0 +1,30 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Create an EdgeCacheKeyset resource.
description: |
Create a new EdgeCacheKeyset resource.
examples: |
To create an EdgeCacheKeyset resource called 'my-keyset', run:
$ {command} my-keyset --public-key='id=KEYID,value=BASE64PUBLICKEY'
request:
collection: networkservices.projects.locations.edgeCacheKeysets
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
async:
collection: networkservices.projects.locations.operations
arguments:
resource:
help_text: The name of the EdgeCacheKeyset resource to create.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheKeyset
params:
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:keyset.description
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:keyset.labels
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:keyset.public_keys
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:keyset.validation_shared_keys

View File

@@ -0,0 +1,26 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Delete an EdgeCacheKeyset resource.
description: |
Delete an EdgeCacheKeyset resource.
examples: |
To delete an EdgeCacheKeyset resource called 'my-keyset', run:
$ {command} my-keyset
request:
collection: networkservices.projects.locations.edgeCacheKeysets
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
async:
collection: networkservices.projects.locations.operations
arguments:
resource:
help_text: The name of the EdgeCacheKeyset resource to delete.
# The following should point to the resource argument definition under your
# surface's command_lib directory.:
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheKeyset

View File

@@ -0,0 +1,20 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Show details about an EdgeCacheKeyset resource.
description: Show details about an EdgeCacheKeyset resource.
examples: |
To show details for an EdgeCacheKeyset resource named 'my-keyset', run:
$ {command} my-keyset
request:
collection: networkservices.projects.locations.edgeCacheKeysets
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
arguments:
resource:
help_text: The EdgeCacheKeyset resource you want to describe.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheKeyset

View File

@@ -0,0 +1,20 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Export an EdgeCacheKeyset resource.
description: Export an EdgeCacheKeyset resource to YAML.
examples: |
To export an EdgeCacheKeyset resourced named 'my-keyset', run:
$ {command} my-keyset --destination=keyset.yaml
request:
collection: networkservices.projects.locations.edgeCacheKeysets
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
arguments:
resource:
help_text: The EdgeCacheKeyset resource you want to export.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheKeyset

View File

@@ -0,0 +1,46 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Import an EdgeCacheKeyset resource.
description: |
Import an EdgeCacheKeyset resource. If the named EdgeCacheKeyset
resource already exists, the resource will be updated to match
the imported resource configuration.
Note: If you are updating an existing EdgeCacheKeyset resource,
you should ensure that it includes any public keys still needed
to validate incoming user requests.
If the named EdgeCacheKeyset resource does not already exist, a
new EdgeCacheKeyset resource will be created with that name.
examples: |
To import an EdgeCacheKeyset resource named 'my-keyset' from a
YAML file, run:
$ {command} my-keyset --source=my-keyset.yaml
request:
collection: networkservices.projects.locations.edgeCacheKeysets
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
async:
collection: networkservices.projects.locations.operations
arguments:
resource:
help_text: The EdgeCacheKeyset resource you want to import.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheKeyset
import:
abort_if_equivalent: true
create_if_not_exists: true
create_request:
collection: networkservices.projects.locations.edgeCacheKeysets
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
method: create

View File

@@ -0,0 +1,33 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: List EdgeCacheKeyset resources.
description: |
List EdgeCacheKeyset resources.
examples: |
To list existing EdgeCacheKeyset resources, run:
$ {command}
request:
collection: networkservices.projects.locations.edgeCacheKeysets
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
response:
id_field: name
arguments:
resource:
help_text: The location (defaults to global) of the resources.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:location
removed_flags: [location]
output:
format: |
table(
name.basename():label=NAME,
publicKeys.len():label=PUBLIC_KEYS,
updateTime:label=UPDATETIME
)

View File

@@ -0,0 +1,44 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Update an EdgeCacheKeyset resource.
description: |
Update an existing EdgeCacheKeyset resource.
examples: |
To update an EdgeCacheKeyset resource called 'my-keyset', run:
$ {command} my-keyset --public-key='id=KEYID,value=BASE64PUBLICKEY'
The `update` command appends keys to an existing EdgeCacheKeyset
resource. To add more than one key to an EdgeCacheKeyset
resource, provide multiple `--public-key` values:
$ {command} my-keyset --public-key='id=KEYID,value=BASE64PUBLICKEY' \
--public-key='id=EXISTING,value=EXISTINGPUBLICKEY'
You can specify, and an EdgeCacheKeyset resource can contain, up
to three (3) public keys. To delete unused public keys within an
existing Keyset, use the `import` command to specify the
EdgeCacheKeyset resource in full, omitting any unused publicKey
items.
request:
collection: networkservices.projects.locations.edgeCacheKeysets
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
method: patch
async:
collection: networkservices.projects.locations.operations
arguments:
resource:
help_text: The name of the EdgeCacheKeyset resource to update.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheKeyset
params:
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:keyset.description
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:keyset.labels
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:keyset.public_keys
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:keyset.validation_shared_keys

View File

@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*- #
# Copyright 2020 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The operations command group for Media CDN."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class Operations(base.Group):
"""Manage EdgeCache operations.
Commands for managing long-running operations.
"""

View File

@@ -0,0 +1,28 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Describe a long-running operation.
description: |
Describe a long-running operation. You can use
this to inspect whether a create or update operation was
successful or the operation returned any errors.
## EXAMPLES
To describe an operation with name simple-operation, run:
$ {command} simple-operation
request:
collection: networkservices.projects.locations.operations
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
arguments:
resource:
help_text: operation to describe.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:operation
removed_flags:
- location

View File

@@ -0,0 +1,40 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: List long-running operations.
description: |
List long-running operations.
## EXAMPLES
To list all operations, run:
$ {command}
request:
collection: networkservices.projects.locations.operations
ALPHA:
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
arguments:
resource:
help_text: The location (defaults to global) to list all operations
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:location
removed_flags:
- location
response:
id_field: name
output:
format: |
table(
metadata.endTime.date('%Y-%m-%d %H:%M:%S %Oz', undefined=''):sort=1,
name.scope("operations"):label=ID,
metadata.target.basename(),
done:label=DONE
)

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*- #
# Copyright 2020 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The origins command group for Media CDN."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class Origins(base.Group):
"""Interact with and manage EdgeCacheOrigin resources."""

View File

@@ -0,0 +1,43 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Create an EdgeCacheOrigin resource.
description: |
Create a new EdgeCacheOrigin resource.
examples: |
To create a EdgeCacheOrigin resource called 'my-origin', run:
$ {command} my-origin --origin-address="origin.example.com"
request:
collection: networkservices.projects.locations.edgeCacheOrigins
modify_request_hooks:
- googlecloudsdk.command_lib.edge_cache.util:SetFailoverOriginRelativeName
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
async:
collection: networkservices.projects.locations.operations
arguments:
resource:
help_text: The name of the EdgeCacheOrigin resource to create.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheOrigin
params:
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.description
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.labels
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.failover_origin
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.flex_shielding
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.max_attempts
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.origin_address
required: true
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.port
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.protocol
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.retry_conditions
# b/187717231
# - _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.connect_timeout
# - _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.max_attempts_timeout
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.response_timeout

View File

@@ -0,0 +1,25 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Delete an EdgeCacheOrigin resource.
description: |
Delete a EdgeCacheOrigin resource.
examples: |
To delete a EdgeCacheOrigin resource called 'my-origin', run:
$ {command} my-origin
request:
collection: networkservices.projects.locations.edgeCacheOrigins
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
async:
collection: networkservices.projects.locations.operations
arguments:
resource:
help_text: The name of the EdgeCacheOrigin resource to delete.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheOrigin

View File

@@ -0,0 +1,21 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Show details about an EdgeCacheOrigin resource.
description: Show details about an EdgeCacheOrigin resource.
examples: |
To show details about an EdgeCacheOrigin resource named 'my-origin', run:
$ {command} my-origin
request:
collection: networkservices.projects.locations.edgeCacheOrigins
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
arguments:
resource:
help_text: The EdgeCacheOrigin resource you want to describe.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheOrigin

View File

@@ -0,0 +1,21 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Export an EdgeCacheOrigin resource.
description: Export an EdgeCacheOrigin resource to YAML.
examples: |
To export an EdgeCacheOrigin resource named 'my-origin', run:
$ {command} my-origin --destination=my-origin.yaml
request:
collection: networkservices.projects.locations.edgeCacheOrigins
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
arguments:
resource:
help_text: The EdgeCacheOrigin resource you want to export.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheOrigin

View File

@@ -0,0 +1,43 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Import an EdgeCacheOrigin resource.
description: |
Import an EdgeCacheOrigin resource. If the named EdgeCacheOrigin
resource already exists, the resource will be updated to match
the imported resource configuration.
If the named EdgeCacheOrigin resource does not already exist, a
new EdgeCacheOrigin resource will be created with that name.
examples: |
To import an EdgeCacheOrigin resource named 'my-origin' from a
YAML file, run:
$ {command} my-origin --source=my-origin.yaml
request:
collection: networkservices.projects.locations.edgeCacheOrigins
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
async:
collection: networkservices.projects.locations.operations
arguments:
resource:
help_text: The EdgeCacheOrigin resource you want to import.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheOrigin
import:
abort_if_equivalent: true
create_if_not_exists: true
create_request:
collection: networkservices.projects.locations.edgeCacheOrigins
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
method: create

View File

@@ -0,0 +1,38 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: List all EdgeCacheOrigin resources in a project.
description: |
List EdgeCacheOrigin resources.
examples: |
To list existing EdgeCacheOrigin resources, run:
$ {command}
request:
collection: networkservices.projects.locations.edgeCacheOrigins
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
response:
id_field: name
arguments:
resource:
help_text: The location (defaults to global) of the resources.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:location
removed_flags: [location]
output:
format: |
table(
name.basename():label=NAME,
originAddress:label=ORIGINADDRESS,
failoverOrigin:label=FAILOVERORIGIN,
maxAttempts:label=MAXATTEMPTS,
port:label=PORT,
protocol:label=PROTOCOL,
updateTime:label=UPDATETIME
)

View File

@@ -0,0 +1,38 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Update an EdgeCacheOrigin resource.
description: |
Update an existing EdgeCacheOrigin resource.
examples: |
To update an EdgeCacheOrigin resource named 'my-origin', run:
$ {command} my-origin --origin-address=new-origin.example.com
request:
collection: networkservices.projects.locations.edgeCacheOrigins
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
method: patch
async:
collection: networkservices.projects.locations.operations
arguments:
resource:
help_text: The name of the EdgeCacheOrigin resource to create.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheOrigin
params:
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.description
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.labels
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.failover_origin
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.flex_shielding
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.max_attempts
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.origin_address
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.port
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.protocol
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.retry_conditions
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:origin.response_timeout

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*- #
# Copyright 2020 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The services command group for Media CDN."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA, base.ReleaseTrack.GA)
class Services(base.Group):
"""Interact with and manage EdgeCacheService resources."""

View File

@@ -0,0 +1,24 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Delete an EdgeCacheService resource.
description: |
Delete an EdgeCacheService resource.
examples: |
To delete an EdgeCacheService resource named 'my-service', run:
$ {command} my-service
request:
collection: networkservices.projects.locations.edgeCacheServices
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
async:
collection: networkservices.projects.locations.operations
arguments:
resource:
help_text: The EdgeCacheService resource to delete.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheService

View File

@@ -0,0 +1,21 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Show details about an EdgeCacheService resource.
description: Show details about an EdgeCacheService resource.
examples: |
To show details about an EdgeCacheService resource named
'my-service', run:
$ {command} my-service
request:
collection: networkservices.projects.locations.edgeCacheServices
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
arguments:
resource:
help_text: The EdgeCacheService resource you want to describe.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheService

View File

@@ -0,0 +1,21 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Export an EdgeCacheService resource.
description: Export an EdgeCacheService resource to YAML.
examples: |
To export an existing EdgeCacheService resource named
'my-service', run:
$ {command} my-service --destination=my-service.yaml
request:
collection: networkservices.projects.locations.edgeCacheServices
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
arguments:
resource:
help_text: The EdgeCacheService resource you want to export.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheService

View File

@@ -0,0 +1,42 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Import an EdgeCacheService resource.
description: |
Import an EdgeCacheService resource. If the named
EdgeCacheService resource already exists, the resource will be
updated to match the imported resource configuration.
If the named EdgeCacheService resource does not already exist, a
new EdgeCacheService resource will be created with that name.
examples: |
To import an EdgeCacheService resource named 'my-service' from a
YAML file, run:
$ {command} my-service --source=my-service.yaml
request:
collection: networkservices.projects.locations.edgeCacheServices
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
async:
collection: networkservices.projects.locations.operations
arguments:
resource:
help_text: The EdgeCacheService resource you want to import.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheService
import:
abort_if_equivalent: true
create_if_not_exists: true
create_request:
collection: networkservices.projects.locations.edgeCacheServices
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
method: create

View File

@@ -0,0 +1,44 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Invalidate the cache for an EdgeCacheService resource.
description: |
Invalidate the cache entries associated with an EdgeCacheService
resource.
examples: |
To invalidate content via a tag, or tags for a given host for
an EdgeCacheService named 'my-service':
$ {command} my-service --tags="status=404" --host="media.example.com"
To invalidate all content under a specific path, specify an
exact path, or a prefix. Prefixes are denoted with a trailing
`*` character.
$ {command} my-service --path="/static/*"
You can optionally combine this with a status code. For example,
to invalidate all cached HTTP 404s:
$ {command} my-service --tags="status=404" --path="/static/*"
request:
collection: networkservices.projects.locations.edgeCacheServices
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
method: invalidateCache
arguments:
resource:
help_text: The EdgeCacheService resource you want to invalidate
the cache for.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheService
params:
- group:
required: true
params:
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:invalidateCacheRequest.host
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:invalidateCacheRequest.path
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:invalidateCacheRequest.tags

View File

@@ -0,0 +1,37 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: List all EdgeCacheService resources in a project.
description: |
List EdgeCacheService resources.
examples: |
To list existing EdgeCacheService resources, run:
$ {command}
request:
collection: networkservices.projects.locations.edgeCacheServices
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
response:
id_field: name
arguments:
resource:
help_text: The location (defaults to global) of the resources.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:location
removed_flags: [location]
output:
format: |
table(
name.basename():label=NAME,
ipv4Addresses.list():label=IPV4_ADDRESSES,
ipv6Addresses.list():label=IPV6_ADDRESSES,
edgeSecurityPolicy:label=EDGE_SECURITY_POLICY,
edgeSslCertificates:label=EDGE_SSL_CERTIFICATES,
logConfig.enabled:label=LOGGING_ENABLED,
updateTime:label=UPDATETIME
)

View File

@@ -0,0 +1,34 @@
- release_tracks: [ALPHA, GA]
help_text:
brief: Update an EdgeCacheService resource.
description: |
Update an existing EdgeCacheService resource.
examples: |
To update an EdgeCacheService resource called 'my-service' run:
$ {command} my-service --description="new description"
request:
collection: networkservices.projects.locations.edgeCacheServices
ALPHA:
api_version: v1alpha1
GA:
api_version: v1
method: patch
async:
collection: networkservices.projects.locations.operations
arguments:
resource:
help_text: The name of the EdgeCacheService resource to create.
spec: !REF googlecloudsdk.command_lib.edge_cache.resources:edgeCacheService
params:
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:service.description
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:service.labels
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:service.edge_security_policy
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:service.edge_ssl_certificate
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:service.enable_logging
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:service.logging_sample_rate
- _REF_: googlecloudsdk.command_lib.edge_cache.flags:service.require_tls