
    o                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  SS	K
Jr  SS
KJr  SSKJr  SSKJr  SSKJr  \	R,                  " \	R.                  R0                  5       " S S\	R2                  5      5       rg)zECommand for deleting a Cloud Security Command Center BigQuery export.    )absolute_import)division)print_function)unicode_literals)securitycenter_client)base)flags)util)bqexport_util)log)
console_ioc                   :    \ rS rSrSrSSSS.r\S 5       rS rS	r	g
)Delete!   z1Delete a Security Command Center BigQuery export.a        Delete a Security Command Center BigQuery export.

      BigQuery exports that are created with Security Command Center API V2 and
      later include a `location` attribute. If the `location` attribute is
      included in the resource name of a BigQuery export, you must specify it
      when referencing the export. For example, the following BigQuery export
      name has `location=eu`:
      `organizations/123/locations/eu/bigQueryExports/test-bq-export`.
      a        To delete a BigQuery export given organization `123` with id
      `test-bq-export`, run:

        $ gcloud scc bqexports delete test-bq-export           --organization=123

      To delete a BigQuery export given folder `456` with `id test-bq-export`,
      run:

        $ gcloud scc bqexports delete test-bq-export --folder=456

      To delete a BigQuery export given project `789` with id `test-bq-export`,
      run:

        $ gcloud scc bqexports delete test-bq-export --project=789

      To delete the BigQuery export `test-bq-export`, with `location=global`,
      from organization `123`, run:

        $ gcloud scc bqexports delete test-bq-export           --organization=123 --location=global
      z      This command uses the Security Command Center API. For more information, see
      [Security Command Center API.](https://cloud.google.com/security-command-center/docs/reference/rest)
      )DESCRIPTIONEXAMPLESzAPI REFERENCEc                     [         R                  " U 5        [         R                  " U 5        [        R                  R                  U 5        [        R                  R                  U 5        g )N)bqexport_flagsAddBigQueryPositionalArgumentAddParentGroup	scc_flagsAPI_VERSION_FLAGAddToParserLOCATION_FLAG)parsers    #lib/surface/scc/bqexports/delete.pyArgsDelete.ArgsM   sF    008!!&)**62''/    c                 *   [         R                  " SSS9  [        R                  " XR                  SS9n[
        R                  " U5      n[
        R                  " U5      nUS:X  aG  UR                  5       n[        R                  " U5      Ul        UR                  R                  U5      nOFUR                  5       n[        R                  " U5      Ul        UR                   R                  U5      n["        R$                  R'                  S5        U$ )Nz3Are you sure you want to delete a BigQuery export?
T)messagecancel_on_no)"version_specific_existing_resourcev1zDeleted.)r   PromptContinuescc_utilGetVersionFromArgumentsBIG_QUERY_EXPORTr   GetMessages	GetClient7SecuritycenterOrganizationsBigQueryExportsDeleteRequestr   "ValidateAndGetBigQueryExportV1Namenameorganizations_bigQueryExportsr   @SecuritycenterOrganizationsLocationsBigQueryExportsDeleteRequest"ValidateAndGetBigQueryExportV2Name'organizations_locations_bigQueryExportsr   statusPrint)selfargsversionmessagesclientreqempty_bq_responses          r   Run
Delete.RunU   s     F ..##G %009H",,W5F$LLNcAA$Gch >>EEcJ 
S
S
U 
 AA$Gch HHOO
 JJZ r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r;   __static_attributes__r=   r   r   r   r   !   s6    9	

.
E&-P 0 0r   r   N)rB   
__future__r   r   r   r   googlecloudsdk.api_lib.sccr   googlecloudsdk.callioper   googlecloudsdk.command_lib.sccr	   r   r
   r&   (googlecloudsdk.command_lib.scc.bqexportsr   r   googlecloudsdk.corer   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackGADeleteCommandr   r=   r   r   <module>rQ      sj     L &  % ' < ( = ; B L # 2 D%%(()QT Q *Qr   