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,32 @@
# -*- coding: utf-8 -*- #
# Copyright 2025 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 Cloud Security Command Center (SCC) artifact guard policies."""
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.Hidden
@base.DefaultUniverseOnly
class Policies(base.Group):
"""Manage Cloud Security Command Center (SCC) artifact guard policies."""
category = base.SECURITY_CATEGORY

View File

@@ -0,0 +1,39 @@
- release_tracks: [ALPHA]
hidden: true
help_text:
brief: |
Create a new artifact guard policy.
description: |
Create a new artifact policy, which is used to guardrail the vulnerabilities that can
be present in an artifact. Each policy has two defining components:
1. Policy Definition: The various rules a given image must adhere to. For this release, the
policy definition is limited to a list of allowed vulnerabilities.
2. Scope: This defines the resources that the policy will be applied to. For this release, the
scope is limited to pipeline type.
examples: |
Create a policy with full name:
$ {command} organizations/123/locations/global/policies/my-policy --policy-file-path=/usr/local/home/user/policy.yaml
Create a policy with policy id:
$ {command} my-policy --policy-file-path=/usr/local/home/user/policy.yaml --location=global --organization=123
request:
collection: artifactscanguard.organizations.locations.policies
api_version: v1alpha
method: create
arguments:
resource:
spec: !REF googlecloudsdk.command_lib.scc.resources:policy
help_text: |
The full name of the policy to create. For example:
organizations/123/locations/global/policies/myPolicy
params:
- arg_name: policy-file-path
api_field: policy
required: true
type: "googlecloudsdk.calliope.arg_parsers:FileContents:"
processor: googlecloudsdk.core.yaml:load
help_text: |
YAML file containing the body of the policy to be created.

View File

@@ -0,0 +1,30 @@
- release_tracks: [ALPHA]
hidden: true
help_text:
brief: |
Delete an artifact guard policy.
description: |
Delete an artifact guard policy for a given policy name. A policy in active state cannot be deleted.
examples: |
To delete a policy named "organizations/123/locations/global/policies/myPolicy",
$ {command} organizations/123/locations/global/policies/myPolicy
OR
$ {command} myPolicy --location=global --organization=123
request:
collection: artifactscanguard.organizations.locations.policies
api_version: v1alpha
method: delete
arguments:
resource:
spec: !REF googlecloudsdk.command_lib.scc.resources:policy
help_text: |
The full name of the policy to create. For example:
organizations/123/locations/global/policies/myPolicy
params:
- arg_name: etag
api_field: etag
help_text: |
The etag of the policy to delete.

View File

@@ -0,0 +1,24 @@
- release_tracks: [ALPHA]
hidden: true
help_text:
brief: |
Describe an artifact guard policy.
description: |
Returns the details of an artifact guard policy for a given policy name.
examples: |
To describe a policy named "organizations/123/locations/global/policies/myPolicy",
$ {command} organizations/123/locations/global/policies/myPolicy
OR
$ {command} myPolicy --location=global --organization=123
request:
collection: artifactscanguard.organizations.locations.policies
api_version: v1alpha
method: get
arguments:
resource:
spec: !REF googlecloudsdk.command_lib.scc.resources:policy
help_text: |
The full name of the policy to create. For example:
organizations/123/locations/global/policies/myPolicy

View File

@@ -0,0 +1,25 @@
- release_tracks: [ALPHA]
hidden: true
help_text:
brief: |
List artifact guard policies.
description: |
Returns the list of policies for a given organization.
examples: |
To list the policies for "organizations/123/locations/global",
$ {command} organizations/123/locations/global
request:
collection: artifactscanguard.organizations.locations.policies
disable_resource_check: true
api_version: v1alpha
method: list
arguments:
params:
- arg_name: parent
api_field: parent
is_positional: true
required: true
help_text: |
The parent, which owns this collection of policies. Format: organizations/{organization}/locations/{location}

View File

@@ -0,0 +1,55 @@
- release_tracks: [ALPHA]
hidden: true
help_text:
brief: |
Update an existing artifact guard policy.
description: |
Updates an existing artifact guard policy.
Update Mask: It updates the policy with the fields specified in the update mask.
If the update mask is not specified or is set to "*", all the fields are updated.
Partial field updates are not supported. The following fields are supported:
- "display_name"
- "description"
- "scope"
- "enablement_state"
- "vulnerability_policy"
- "annotations"
Allow missing: If set, the policy will be created if it does not exist.
examples: |
To update a policy named "organizations/123/locations/global/policies/myPolicy",
$ {command} organizations/123/locations/global/policies/myPolicy --policy-file-path=policy.yaml
OR
$ {command} myPolicy --location=global --organization=123 --policy-file-path=policy.yaml
request:
collection: artifactscanguard.organizations.locations.policies
api_version: v1alpha
method: patch
arguments:
resource:
spec: !REF googlecloudsdk.command_lib.scc.resources:policy
help_text: |
The full name of the policy to update. For example:
organizations/123/locations/global/policies/myPolicy
params:
- arg_name: policy-file-path
api_field: policy
required: true
type: "googlecloudsdk.calliope.arg_parsers:FileContents:"
processor: googlecloudsdk.core.yaml:load
help_text: |
YAML file containing the body of the policy to be created.
- arg_name: update-mask
api_field: updateMask
help_text: |
The list of fields to update. Eg: "description,display_name"
- arg_name: allow-missing
api_field: allowMissing
type: bool
help_text: |
If set, the policy will be created if it does not exist.