Package com.pulumi.gcp.assuredworkloads
Class Workload
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.gcp.assuredworkloads.Workload
-
public class Workload extends com.pulumi.resources.CustomResource
The AssuredWorkloads Workload resource ## Example Usage ### Basic_workload A basic test of a assuredworkloads api ```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() .billingAccount("billingAccounts/000000-0000000-0000000-000000") .complianceRegime("FEDRAMP_MODERATE") .displayName("Workload Example") .kmsSettings(WorkloadKmsSettingsArgs.builder() .nextRotationTime("9999-10-02T15:01:23Z") .rotationPeriod("10368000s") .build()) .labels(Map.of("label-one", "value-one")) .location("us-west1") .organization("123456789") .provisionedResourcesParent("folders/519620126891") .resourceSettings( WorkloadResourceSettingArgs.builder() .resourceType("CONSUMER_PROJECT") .build(), WorkloadResourceSettingArgs.builder() .resourceType("ENCRYPTION_KEYS_PROJECT") .build(), WorkloadResourceSettingArgs.builder() .resourceId("ring") .resourceType("KEYRING") .build()) .build()); } } ``` ## Import Workload can be imported using any of these accepted formats ```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}} ```
-
-
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)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>
billingAccount()
com.pulumi.core.Output<java.lang.String>
complianceRegime()
com.pulumi.core.Output<java.lang.String>
createTime()
com.pulumi.core.Output<java.lang.String>
displayName()
static Workload
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, WorkloadState state, 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.com.pulumi.core.Output<java.util.Optional<WorkloadKmsSettings>>
kmsSettings()
com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>
labels()
com.pulumi.core.Output<java.lang.String>
location()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.lang.String>
organization()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
provisionedResourcesParent()
com.pulumi.core.Output<java.util.List<WorkloadResource>>
resources()
com.pulumi.core.Output<java.util.Optional<java.util.List<WorkloadResourceSetting>>>
resourceSettings()
-
-
-
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.lang.String> billingAccount()
- Returns:
- Required. 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, EU_REGIONS_AND_SUPPORT, CA_REGIONS_AND_SUPPORT, ITAR, AU_REGIONS_AND_US_SUPPORT, ASSURED_WORKLOADS_FOR_PARTNERS
-
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
-
kmsSettings
public com.pulumi.core.Output<java.util.Optional<WorkloadKmsSettings>> kmsSettings()
- Returns:
- Input only. Settings used to create a CMEK crypto key. When set a project with a KMS CMEK key is provisioned. This field is mandatory for a subset of Compliance Regimes.
-
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.
-
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 ***
-
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 an organization or a folder. Must be the same or a child of the Workload parent. If not specified all resources are created under the Workload parent. Formats: folders/{folder_id}, organizations/{organization_id}
-
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.
-
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.
-
-