Class Workload


  • public class Workload
    extends com.pulumi.resources.CustomResource
    The AssuredWorkloads Workload resource ## Example Usage ### Basic_workload A basic test of a assuredworkloads api <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.assuredworkloads.Workload; import com.pulumi.gcp.assuredworkloads.WorkloadArgs; import com.pulumi.gcp.assuredworkloads.inputs.WorkloadKmsSettingsArgs; import com.pulumi.gcp.assuredworkloads.inputs.WorkloadResourceSettingArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var primary = new Workload("primary", WorkloadArgs.builder() .complianceRegime("FEDRAMP_MODERATE") .displayName("{{display}}") .location("us-west1") .organization("123456789") .billingAccount("billingAccounts/000000-0000000-0000000-000000") .kmsSettings(WorkloadKmsSettingsArgs.builder() .nextRotationTime("9999-10-02T15:01:23Z") .rotationPeriod("10368000s") .build()) .provisionedResourcesParent("folders/519620126891") .resourceSettings( WorkloadResourceSettingArgs.builder() .displayName("folder-display-name") .resourceType("CONSUMER_FOLDER") .build(), WorkloadResourceSettingArgs.builder() .resourceType("ENCRYPTION_KEYS_PROJECT") .build(), WorkloadResourceSettingArgs.builder() .resourceId("ring") .resourceType("KEYRING") .build()) .violationNotificationsEnabled(true) .labels(Map.of("label-one", "value-one")) .build()); } } ``` <!--End PulumiCodeChooser --> ### Sovereign_controls_workload A Sovereign Controls test of the assuredworkloads api <!--Start PulumiCodeChooser --> ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.assuredworkloads.Workload; import com.pulumi.gcp.assuredworkloads.WorkloadArgs; import com.pulumi.gcp.assuredworkloads.inputs.WorkloadKmsSettingsArgs; import com.pulumi.gcp.assuredworkloads.inputs.WorkloadResourceSettingArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.io.File; import java.nio.file.Files; import java.nio.file.Paths; public class App { public static void main(String[] args) { Pulumi.run(App::stack); } public static void stack(Context ctx) { var primary = new Workload("primary", WorkloadArgs.builder() .complianceRegime("EU_REGIONS_AND_SUPPORT") .displayName("display") .location("europe-west9") .organization("123456789") .billingAccount("billingAccounts/000000-0000000-0000000-000000") .enableSovereignControls(true) .kmsSettings(WorkloadKmsSettingsArgs.builder() .nextRotationTime("9999-10-02T15:01:23Z") .rotationPeriod("10368000s") .build()) .resourceSettings( WorkloadResourceSettingArgs.builder() .resourceType("CONSUMER_FOLDER") .build(), WorkloadResourceSettingArgs.builder() .resourceType("ENCRYPTION_KEYS_PROJECT") .build(), WorkloadResourceSettingArgs.builder() .resourceId("ring") .resourceType("KEYRING") .build()) .labels(Map.of("label-one", "value-one")) .build()); } } ``` <!--End PulumiCodeChooser --> ## Import Workload can be imported using any of these accepted formats: * `organizations/{{organization}}/locations/{{location}}/workloads/{{name}}` * `{{organization}}/{{location}}/{{name}}` When using the `pulumi import` command, Workload can be imported using one of the formats above. For example: ```sh $ pulumi import gcp:assuredworkloads/workload:Workload default organizations/{{organization}}/locations/{{location}}/workloads/{{name}} ``` ```sh $ pulumi import gcp:assuredworkloads/workload:Workload default {{organization}}/{{location}}/{{name}} ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Constructor Summary

      Constructors 
      Constructor Description
      Workload​(java.lang.String name)  
      Workload​(java.lang.String name, WorkloadArgs args)  
      Workload​(java.lang.String name, WorkloadArgs args, com.pulumi.resources.CustomResourceOptions options)  
    • Constructor Detail

      • Workload

        public Workload​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • Workload

        public Workload​(java.lang.String name,
                        WorkloadArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • Workload

        public Workload​(java.lang.String name,
                        WorkloadArgs args,
                        @Nullable
                        com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • billingAccount

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> billingAccount()
        Returns:
        Optional. Input only. The billing account used for the resources which are direct children of workload. This billing account is initially associated with the resources created as part of Workload creation. After the initial creation of these resources, the customer can change the assigned billing account. The resource name has the form `billingAccounts/{billing_account_id}`. For example, `billingAccounts/012345-567890-ABCDEF`.
      • complianceRegime

        public com.pulumi.core.Output<java.lang.String> complianceRegime()
        Returns:
        Required. Immutable. Compliance Regime associated with this workload. Possible values: COMPLIANCE_REGIME_UNSPECIFIED, IL4, CJIS, FEDRAMP_HIGH, FEDRAMP_MODERATE, US_REGIONAL_ACCESS, HIPAA, HITRUST, EU_REGIONS_AND_SUPPORT, CA_REGIONS_AND_SUPPORT, ITAR, AU_REGIONS_AND_US_SUPPORT, ASSURED_WORKLOADS_FOR_PARTNERS, ISR_REGIONS, ISR_REGIONS_AND_SUPPORT, CA_PROTECTED_B, IL5, IL2, JP_REGIONS_AND_SUPPORT
      • complianceStatuses

        public com.pulumi.core.Output<java.util.List<WorkloadComplianceStatus>> complianceStatuses()
        Returns:
        Output only. Count of active Violations in the Workload.
      • compliantButDisallowedServices

        public com.pulumi.core.Output<java.util.List<java.lang.String>> compliantButDisallowedServices()
        Returns:
        Output only. Urls for services which are compliant for this Assured Workload, but which are currently disallowed by the ResourceUsageRestriction org policy. Invoke workloads.restrictAllowedResources endpoint to allow your project developers to use these services in their environment.
      • createTime

        public com.pulumi.core.Output<java.lang.String> createTime()
        Returns:
        Output only. Immutable. The Workload creation timestamp.
      • displayName

        public com.pulumi.core.Output<java.lang.String> displayName()
        Returns:
        Required. The user-assigned display name of the Workload. When present it must be between 4 to 30 characters. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, and spaces. Example: My Workload
      • effectiveLabels

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.Object>> effectiveLabels()
        Returns:
        All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
      • ekmProvisioningResponses

        public com.pulumi.core.Output<java.util.List<WorkloadEkmProvisioningResponse>> ekmProvisioningResponses()
        Returns:
        Optional. Represents the Ekm Provisioning State of the given workload.
      • enableSovereignControls

        public com.pulumi.core.Output<java.lang.Boolean> enableSovereignControls()
        Returns:
        Optional. Indicates the sovereignty status of the given workload. Currently meant to be used by Europe/Canada customers.
      • kajEnrollmentState

        public com.pulumi.core.Output<java.lang.String> kajEnrollmentState()
        Returns:
        Output only. Represents the KAJ enrollment state of the given workload. Possible values: KAJ_ENROLLMENT_STATE_UNSPECIFIED, KAJ_ENROLLMENT_STATE_PENDING, KAJ_ENROLLMENT_STATE_COMPLETE
      • kmsSettings

        public com.pulumi.core.Output<java.util.Optional<WorkloadKmsSettings>> kmsSettings()
        Returns:
        **DEPRECATED** Input only. Settings used to create a CMEK crypto key. When set, a project with a KMS CMEK key is provisioned. This field is deprecated as of Feb 28, 2022. In order to create a Keyring, callers should specify, ENCRYPTION_KEYS_PROJECT or KEYRING in ResourceSettings.resource_type field.
      • labels

        public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,​java.lang.String>>> labels()
        Returns:
        Optional. Labels applied to the workload. **Note**: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field `effective_labels` for all of the labels present on the resource.
      • location

        public com.pulumi.core.Output<java.lang.String> location()
        Returns:
        The location for the resource
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        Output only. The resource name of the workload.
      • organization

        public com.pulumi.core.Output<java.lang.String> organization()
        Returns:
        The organization for the resource ***
      • partner

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> partner()
        Returns:
        Optional. Partner regime associated with this workload. Possible values: PARTNER_UNSPECIFIED, LOCAL_CONTROLS_BY_S3NS, SOVEREIGN_CONTROLS_BY_T_SYSTEMS, SOVEREIGN_CONTROLS_BY_SIA_MINSAIT, SOVEREIGN_CONTROLS_BY_PSN
      • partnerPermissions

        public com.pulumi.core.Output<java.util.Optional<WorkloadPartnerPermissions>> partnerPermissions()
        Returns:
        Optional. Permissions granted to the AW Partner SA account for the customer workload
      • provisionedResourcesParent

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> provisionedResourcesParent()
        Returns:
        Input only. The parent resource for the resources managed by this Assured Workload. May be either empty or a folder resource which is a child of the Workload parent. If not specified all resources are created under the parent organization. Format: folders/{folder_id}
      • pulumiLabels

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.Object>> pulumiLabels()
        Returns:
        The combination of labels configured directly on the resource and default labels configured on the provider.
      • resourceSettings

        public com.pulumi.core.Output<java.util.Optional<java.util.List<WorkloadResourceSetting>>> resourceSettings()
        Returns:
        Input only. Resource properties that are used to customize workload resources. These properties (such as custom project id) will be used to create workload resources if possible. This field is optional.
      • resources

        public com.pulumi.core.Output<java.util.List<WorkloadResource>> resources()
        Returns:
        Output only. The resources associated with this workload. These resources will be created when creating the workload. If any of the projects already exist, the workload creation will fail. Always read only.
      • saaEnrollmentResponses

        public com.pulumi.core.Output<java.util.List<WorkloadSaaEnrollmentResponse>> saaEnrollmentResponses()
        Returns:
        Output only. Represents the SAA enrollment response of the given workload. SAA enrollment response is queried during workloads.get call. In failure cases, user friendly error message is shown in SAA details page.
      • violationNotificationsEnabled

        public com.pulumi.core.Output<java.lang.Boolean> violationNotificationsEnabled()
        Returns:
        Optional. Indicates whether the e-mail notification for a violation is enabled for a workload. This value will be by default True, and if not present will be considered as true. This should only be updated via updateWorkload call. Any Changes to this field during the createWorkload call will not be honored. This will always be true while creating the workload.
      • get

        public static Workload get​(java.lang.String name,
                                   com.pulumi.core.Output<java.lang.String> id,
                                   @Nullable
                                   WorkloadState state,
                                   @Nullable
                                   com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.