File: //usr/lib/google-cloud-sdk/lib/surface/artifacts/sbom/__pycache__/export.cpython-312.pyc
�
��� � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm
Z
ej ej ej j � G d � d
ej � � � Zy)z,Implements the command to export SBOM files.� )�absolute_import)�division)�unicode_literals)�base)�
endpoint_util)�flags)� sbom_utilc �0 � e Zd ZdZddd�Zed� � Zd� Zy)�Exportz*Export SBOM files to Google Cloud Storage.z
{description}a To export an SBOM file for the Artifact Registry image with URI "us-west1-docker.pkg.dev/my-project/my-repository/busy-box@sha256:abcxyz":
$ {command} --uri=us-west1-docker.pkg.dev/my-project/my-repository/busy-box@sha256:abcxyz
)�DESCRIPTION�EXAMPLESc � � | j j d� | j ddd�� t j � j | � y)z[Set up arguments for this command.
Args:
parser: An argparse.ArgumentPaser.
�yamlz--uriTa The URI of the Artifact Registry image the SBOM is exported for. A 'gcr.io' image can also be used if redirection is enabled in Artifact Registry. Make sure 'artifactregistry.projectsettings.get' permission is granted to the current gcloud user to verify the redirection status.)�required�helpN)�display_info� AddFormat�add_argumentr �GetOptionalAALocationFlag�AddToParser)�parsers �$lib/surface/artifacts/sbom/export.py�ArgszExport.Args) sP � � ���!�!�&�)�
�����
I� �
�
�#�#�%�1�1�&�9� c � � |j }t j |� 5 t j |� ddd� y# 1 sw Y yxY w)z�This is what gets called when the user runs this command.
Args:
args: An argparse namespace. All the arguments that were provided to this
command invocation.
N)�locationr �
WithRegionr �
ExportSbom)�self�argsr s r �Runz
Export.Run>