
                             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S.r " S S\R                  5      rg)z>Base class used to create a new Assured Workloads environment.    )absolute_import)division)unicode_literals)endpoint_util)message_util)	workloads)base)logz*Create a new Assured Workloads environmenta
       The following example command creates a new Assured Workloads environment with these properties:

    * belonging to an organization with ID 123
    * located in the `us-central1` region
    * display name `Test-Workload`
    * compliance regime `FEDRAMP_MODERATE`
    * billing account `billingAccounts/456`
    * first key rotation set for 10:15am on the December 30, 2020
    * key rotation interval set for every 48 hours
    * with the label: key = 'LabelKey1', value = 'LabelValue1'
    * with the label: key = 'LabelKey2', value = 'LabelValue2'
    * provisioned resources parent 'folders/789'
    * with custom project id 'my-custom-id' for consumer project
    * with external identifier for the workload of 'external-id'

      $ {command} --organization=123 --location=us-central1 --display-name=Test-Workload --compliance-regime=FEDRAMP_MODERATE --billing-account=billingAccounts/456 --next-rotation-time=2020-12-30T10:15:00.00Z --rotation-period=172800s --labels=LabelKey1=LabelValue1,LabelKey2=LabelValue2 --provisioned-resources-parent=folders/789 --resource-settings=consumer-project-id=my-custom-id --external-identifier=external-id


    The following example command creates a new Partner Assured Workloads, with the following properties:

    * belonging to an organization with ID 123
    * located in the `me-central2` region
    * display name `Test-Workload`
    * partner `CNTXT`
    * partner services billing account `billingAccounts/789`
    * billing account `billingAccounts/456`
    * data logs viewer partner permission enabled
    * first key rotation set for 10:15am on the December 30, 2020
    * key rotation interval set for every 48 hours
    * with the label: key = 'LabelKey1', value = 'LabelValue1'
    * with the label: key = 'LabelKey2', value = 'LabelValue2'
    * provisioned resources parent 'folders/789'
    * with custom project id 'my-custom-id' for consumer project
    * with external identifier for the workload of 'external-id'

      $ {command} --organization=123 --location=me-central2 --display-name=Test-Workload --compliance-regime=ASSURED_WORKLOADS_FOR_PARTNERS --partner=SOVEREIGN_CONTROLS_BY_CNTXT --partner-services-billing-account=billingAccounts/01BF3F-2C6DE5-30C607 --partner-permissions=data-logs-viewer=true --billing-account=billingAccounts/456 --next-rotation-time=2020-12-30T10:15:00.00Z --rotation-period=172800s --labels=LabelKey1=LabelValue1,LabelKey2=LabelValue2 --provisioned-resources-parent=folders/789 --resource-settings=consumer-project-id=my-custom-id  --external-identifier=external-id
    )DESCRIPTIONEXAMPLESc                   (    \ rS rSrSr\rS rS rSr	g)CreateWorkloadF   z+Create a new Assured Workloads environment.c                    [         R                  " U R                  5       UR                  S9   [        R
                  " UR                  UR                  S9n[        R                  " UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                  UR                   UR"                  UR$                  UR&                  U R                  5       S9n[(        R*                  " U R                  5       S9nUR-                  UR.                  UUS9U l        U R0                  sSSS5        $ ! , (       d  f       g= f)zRun the create command.)release_trackregion)organization_idlocation)display_namecompliance_regimepartner partner_services_billing_accountpartner_permissionsbilling_accountnext_rotation_timerotation_periodlabelsprovisioned_resources_parentresource_settingsenable_sovereign_controlsr   )r   )external_idparentworkloadN)r   +AssuredWorkloadsEndpointOverridesFromRegionReleaseTrackr   r   CreateAssuredParentorganizationCreateAssuredWorkloadr   r   r   r   r   r   r   r   r   r   r   r    apisWorkloadsClientCreateexternal_identifiercreated_resource)selfargsr"   r#   clients        9lib/googlecloudsdk/command_lib/assured/create_workload.pyRunCreateWorkload.RunK   s%   		B	B'')$--
A//++dmmEf33(( 22,,+/+P+P"66..!44..'+'H'H 22$($B$B))+h ##$2C2C2EFf$mm.. , d ""1
A 
A 
As   DE
E#c                 V    [         R                  " U R                  R                  SS9  g )NzAssured Workloads environment)kind)r
   CreatedResourcer-   name)r.   resources_were_displayeds     r1   EpilogCreateWorkload.Epilogg   s#    "")HJ    )r-   N)
__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpr2   r9   __static_attributes__ r;   r1   r   r   F   s    3 -#8Jr;   r   N)r@   
__future__r   r   r   googlecloudsdk.api_lib.assuredr   r   r   r)   googlecloudsdk.callioper	   googlecloudsdk.corer
   rA   CreateCommandr   rD   r;   r1   <module>rJ      sJ    E &  ' 8 7 < ( # @%(V#JT'' #Jr;   