1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. apphub
  5. Workload
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

gcp.apphub.Workload

Explore with Pulumi AI

Workload represents a binary deployment (such as Managed Instance Groups (MIGs), GKE deployments, etc.) that performs the smallest logical subset of business functionality. It registers identified workload to the Application.

Example Usage

Create Workload Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Workload(name: string, args: WorkloadArgs, opts?: CustomResourceOptions);
@overload
def Workload(resource_name: str,
             args: WorkloadArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def Workload(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             application_id: Optional[str] = None,
             discovered_workload: Optional[str] = None,
             location: Optional[str] = None,
             workload_id: Optional[str] = None,
             attributes: Optional[WorkloadAttributesArgs] = None,
             description: Optional[str] = None,
             display_name: Optional[str] = None,
             project: Optional[str] = None)
func NewWorkload(ctx *Context, name string, args WorkloadArgs, opts ...ResourceOption) (*Workload, error)
public Workload(string name, WorkloadArgs args, CustomResourceOptions? opts = null)
public Workload(String name, WorkloadArgs args)
public Workload(String name, WorkloadArgs args, CustomResourceOptions options)
type: gcp:apphub:Workload
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. WorkloadArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. WorkloadArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. WorkloadArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. WorkloadArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. WorkloadArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var workloadResource = new Gcp.Apphub.Workload("workloadResource", new()
{
    ApplicationId = "string",
    DiscoveredWorkload = "string",
    Location = "string",
    WorkloadId = "string",
    Attributes = new Gcp.Apphub.Inputs.WorkloadAttributesArgs
    {
        BusinessOwners = new[]
        {
            new Gcp.Apphub.Inputs.WorkloadAttributesBusinessOwnerArgs
            {
                Email = "string",
                DisplayName = "string",
            },
        },
        Criticality = new Gcp.Apphub.Inputs.WorkloadAttributesCriticalityArgs
        {
            Type = "string",
        },
        DeveloperOwners = new[]
        {
            new Gcp.Apphub.Inputs.WorkloadAttributesDeveloperOwnerArgs
            {
                Email = "string",
                DisplayName = "string",
            },
        },
        Environment = new Gcp.Apphub.Inputs.WorkloadAttributesEnvironmentArgs
        {
            Type = "string",
        },
        OperatorOwners = new[]
        {
            new Gcp.Apphub.Inputs.WorkloadAttributesOperatorOwnerArgs
            {
                Email = "string",
                DisplayName = "string",
            },
        },
    },
    Description = "string",
    DisplayName = "string",
    Project = "string",
});
Copy
example, err := apphub.NewWorkload(ctx, "workloadResource", &apphub.WorkloadArgs{
	ApplicationId:      pulumi.String("string"),
	DiscoveredWorkload: pulumi.String("string"),
	Location:           pulumi.String("string"),
	WorkloadId:         pulumi.String("string"),
	Attributes: &apphub.WorkloadAttributesArgs{
		BusinessOwners: apphub.WorkloadAttributesBusinessOwnerArray{
			&apphub.WorkloadAttributesBusinessOwnerArgs{
				Email:       pulumi.String("string"),
				DisplayName: pulumi.String("string"),
			},
		},
		Criticality: &apphub.WorkloadAttributesCriticalityArgs{
			Type: pulumi.String("string"),
		},
		DeveloperOwners: apphub.WorkloadAttributesDeveloperOwnerArray{
			&apphub.WorkloadAttributesDeveloperOwnerArgs{
				Email:       pulumi.String("string"),
				DisplayName: pulumi.String("string"),
			},
		},
		Environment: &apphub.WorkloadAttributesEnvironmentArgs{
			Type: pulumi.String("string"),
		},
		OperatorOwners: apphub.WorkloadAttributesOperatorOwnerArray{
			&apphub.WorkloadAttributesOperatorOwnerArgs{
				Email:       pulumi.String("string"),
				DisplayName: pulumi.String("string"),
			},
		},
	},
	Description: pulumi.String("string"),
	DisplayName: pulumi.String("string"),
	Project:     pulumi.String("string"),
})
Copy
var workloadResource = new Workload("workloadResource", WorkloadArgs.builder()
    .applicationId("string")
    .discoveredWorkload("string")
    .location("string")
    .workloadId("string")
    .attributes(WorkloadAttributesArgs.builder()
        .businessOwners(WorkloadAttributesBusinessOwnerArgs.builder()
            .email("string")
            .displayName("string")
            .build())
        .criticality(WorkloadAttributesCriticalityArgs.builder()
            .type("string")
            .build())
        .developerOwners(WorkloadAttributesDeveloperOwnerArgs.builder()
            .email("string")
            .displayName("string")
            .build())
        .environment(WorkloadAttributesEnvironmentArgs.builder()
            .type("string")
            .build())
        .operatorOwners(WorkloadAttributesOperatorOwnerArgs.builder()
            .email("string")
            .displayName("string")
            .build())
        .build())
    .description("string")
    .displayName("string")
    .project("string")
    .build());
Copy
workload_resource = gcp.apphub.Workload("workloadResource",
    application_id="string",
    discovered_workload="string",
    location="string",
    workload_id="string",
    attributes={
        "business_owners": [{
            "email": "string",
            "display_name": "string",
        }],
        "criticality": {
            "type": "string",
        },
        "developer_owners": [{
            "email": "string",
            "display_name": "string",
        }],
        "environment": {
            "type": "string",
        },
        "operator_owners": [{
            "email": "string",
            "display_name": "string",
        }],
    },
    description="string",
    display_name="string",
    project="string")
Copy
const workloadResource = new gcp.apphub.Workload("workloadResource", {
    applicationId: "string",
    discoveredWorkload: "string",
    location: "string",
    workloadId: "string",
    attributes: {
        businessOwners: [{
            email: "string",
            displayName: "string",
        }],
        criticality: {
            type: "string",
        },
        developerOwners: [{
            email: "string",
            displayName: "string",
        }],
        environment: {
            type: "string",
        },
        operatorOwners: [{
            email: "string",
            displayName: "string",
        }],
    },
    description: "string",
    displayName: "string",
    project: "string",
});
Copy
type: gcp:apphub:Workload
properties:
    applicationId: string
    attributes:
        businessOwners:
            - displayName: string
              email: string
        criticality:
            type: string
        developerOwners:
            - displayName: string
              email: string
        environment:
            type: string
        operatorOwners:
            - displayName: string
              email: string
    description: string
    discoveredWorkload: string
    displayName: string
    location: string
    project: string
    workloadId: string
Copy

Workload Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Workload resource accepts the following input properties:

ApplicationId
This property is required.
Changes to this property will trigger replacement.
string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
DiscoveredWorkload
This property is required.
Changes to this property will trigger replacement.
string
Immutable. The resource name of the original discovered workload.
Location
This property is required.
Changes to this property will trigger replacement.
string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
WorkloadId
This property is required.
Changes to this property will trigger replacement.
string
The Workload identifier.


Attributes WorkloadAttributes
Consumer provided attributes. Structure is documented below.
Description string
User-defined description of a Workload.
DisplayName string
User-defined name for the Workload.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
ApplicationId
This property is required.
Changes to this property will trigger replacement.
string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
DiscoveredWorkload
This property is required.
Changes to this property will trigger replacement.
string
Immutable. The resource name of the original discovered workload.
Location
This property is required.
Changes to this property will trigger replacement.
string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
WorkloadId
This property is required.
Changes to this property will trigger replacement.
string
The Workload identifier.


Attributes WorkloadAttributesArgs
Consumer provided attributes. Structure is documented below.
Description string
User-defined description of a Workload.
DisplayName string
User-defined name for the Workload.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
applicationId
This property is required.
Changes to this property will trigger replacement.
String
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
discoveredWorkload
This property is required.
Changes to this property will trigger replacement.
String
Immutable. The resource name of the original discovered workload.
location
This property is required.
Changes to this property will trigger replacement.
String
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
workloadId
This property is required.
Changes to this property will trigger replacement.
String
The Workload identifier.


attributes WorkloadAttributes
Consumer provided attributes. Structure is documented below.
description String
User-defined description of a Workload.
displayName String
User-defined name for the Workload.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
applicationId
This property is required.
Changes to this property will trigger replacement.
string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
discoveredWorkload
This property is required.
Changes to this property will trigger replacement.
string
Immutable. The resource name of the original discovered workload.
location
This property is required.
Changes to this property will trigger replacement.
string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
workloadId
This property is required.
Changes to this property will trigger replacement.
string
The Workload identifier.


attributes WorkloadAttributes
Consumer provided attributes. Structure is documented below.
description string
User-defined description of a Workload.
displayName string
User-defined name for the Workload.
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
application_id
This property is required.
Changes to this property will trigger replacement.
str
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
discovered_workload
This property is required.
Changes to this property will trigger replacement.
str
Immutable. The resource name of the original discovered workload.
location
This property is required.
Changes to this property will trigger replacement.
str
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
workload_id
This property is required.
Changes to this property will trigger replacement.
str
The Workload identifier.


attributes WorkloadAttributesArgs
Consumer provided attributes. Structure is documented below.
description str
User-defined description of a Workload.
display_name str
User-defined name for the Workload.
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
applicationId
This property is required.
Changes to this property will trigger replacement.
String
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
discoveredWorkload
This property is required.
Changes to this property will trigger replacement.
String
Immutable. The resource name of the original discovered workload.
location
This property is required.
Changes to this property will trigger replacement.
String
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
workloadId
This property is required.
Changes to this property will trigger replacement.
String
The Workload identifier.


attributes Property Map
Consumer provided attributes. Structure is documented below.
description String
User-defined description of a Workload.
displayName String
User-defined name for the Workload.
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Outputs

All input properties are implicitly available as output properties. Additionally, the Workload resource produces the following output properties:

CreateTime string
Output only. Create time.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
State string
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
Uid string
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
UpdateTime string
Output only. Update time.
WorkloadProperties List<WorkloadWorkloadProperty>
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
WorkloadReferences List<WorkloadWorkloadReference>
Reference of an underlying compute resource represented by the Workload. Structure is documented below.
CreateTime string
Output only. Create time.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
State string
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
Uid string
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
UpdateTime string
Output only. Update time.
WorkloadProperties []WorkloadWorkloadProperty
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
WorkloadReferences []WorkloadWorkloadReference
Reference of an underlying compute resource represented by the Workload. Structure is documented below.
createTime String
Output only. Create time.
id String
The provider-assigned unique ID for this managed resource.
name String
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
state String
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
uid String
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
updateTime String
Output only. Update time.
workloadProperties List<WorkloadWorkloadProperty>
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
workloadReferences List<WorkloadWorkloadReference>
Reference of an underlying compute resource represented by the Workload. Structure is documented below.
createTime string
Output only. Create time.
id string
The provider-assigned unique ID for this managed resource.
name string
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
state string
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
uid string
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
updateTime string
Output only. Update time.
workloadProperties WorkloadWorkloadProperty[]
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
workloadReferences WorkloadWorkloadReference[]
Reference of an underlying compute resource represented by the Workload. Structure is documented below.
create_time str
Output only. Create time.
id str
The provider-assigned unique ID for this managed resource.
name str
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
state str
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
uid str
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
update_time str
Output only. Update time.
workload_properties Sequence[WorkloadWorkloadProperty]
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
workload_references Sequence[WorkloadWorkloadReference]
Reference of an underlying compute resource represented by the Workload. Structure is documented below.
createTime String
Output only. Create time.
id String
The provider-assigned unique ID for this managed resource.
name String
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
state String
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
uid String
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
updateTime String
Output only. Update time.
workloadProperties List<Property Map>
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
workloadReferences List<Property Map>
Reference of an underlying compute resource represented by the Workload. Structure is documented below.

Look up Existing Workload Resource

Get an existing Workload resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: WorkloadState, opts?: CustomResourceOptions): Workload
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        application_id: Optional[str] = None,
        attributes: Optional[WorkloadAttributesArgs] = None,
        create_time: Optional[str] = None,
        description: Optional[str] = None,
        discovered_workload: Optional[str] = None,
        display_name: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        state: Optional[str] = None,
        uid: Optional[str] = None,
        update_time: Optional[str] = None,
        workload_id: Optional[str] = None,
        workload_properties: Optional[Sequence[WorkloadWorkloadPropertyArgs]] = None,
        workload_references: Optional[Sequence[WorkloadWorkloadReferenceArgs]] = None) -> Workload
func GetWorkload(ctx *Context, name string, id IDInput, state *WorkloadState, opts ...ResourceOption) (*Workload, error)
public static Workload Get(string name, Input<string> id, WorkloadState? state, CustomResourceOptions? opts = null)
public static Workload get(String name, Output<String> id, WorkloadState state, CustomResourceOptions options)
resources:  _:    type: gcp:apphub:Workload    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ApplicationId Changes to this property will trigger replacement. string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
Attributes WorkloadAttributes
Consumer provided attributes. Structure is documented below.
CreateTime string
Output only. Create time.
Description string
User-defined description of a Workload.
DiscoveredWorkload Changes to this property will trigger replacement. string
Immutable. The resource name of the original discovered workload.
DisplayName string
User-defined name for the Workload.
Location Changes to this property will trigger replacement. string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
Name string
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
State string
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
Uid string
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
UpdateTime string
Output only. Update time.
WorkloadId Changes to this property will trigger replacement. string
The Workload identifier.


WorkloadProperties List<WorkloadWorkloadProperty>
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
WorkloadReferences List<WorkloadWorkloadReference>
Reference of an underlying compute resource represented by the Workload. Structure is documented below.
ApplicationId Changes to this property will trigger replacement. string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
Attributes WorkloadAttributesArgs
Consumer provided attributes. Structure is documented below.
CreateTime string
Output only. Create time.
Description string
User-defined description of a Workload.
DiscoveredWorkload Changes to this property will trigger replacement. string
Immutable. The resource name of the original discovered workload.
DisplayName string
User-defined name for the Workload.
Location Changes to this property will trigger replacement. string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
Name string
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
State string
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
Uid string
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
UpdateTime string
Output only. Update time.
WorkloadId Changes to this property will trigger replacement. string
The Workload identifier.


WorkloadProperties []WorkloadWorkloadPropertyArgs
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
WorkloadReferences []WorkloadWorkloadReferenceArgs
Reference of an underlying compute resource represented by the Workload. Structure is documented below.
applicationId Changes to this property will trigger replacement. String
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
attributes WorkloadAttributes
Consumer provided attributes. Structure is documented below.
createTime String
Output only. Create time.
description String
User-defined description of a Workload.
discoveredWorkload Changes to this property will trigger replacement. String
Immutable. The resource name of the original discovered workload.
displayName String
User-defined name for the Workload.
location Changes to this property will trigger replacement. String
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
name String
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
state String
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
uid String
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
updateTime String
Output only. Update time.
workloadId Changes to this property will trigger replacement. String
The Workload identifier.


workloadProperties List<WorkloadWorkloadProperty>
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
workloadReferences List<WorkloadWorkloadReference>
Reference of an underlying compute resource represented by the Workload. Structure is documented below.
applicationId Changes to this property will trigger replacement. string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
attributes WorkloadAttributes
Consumer provided attributes. Structure is documented below.
createTime string
Output only. Create time.
description string
User-defined description of a Workload.
discoveredWorkload Changes to this property will trigger replacement. string
Immutable. The resource name of the original discovered workload.
displayName string
User-defined name for the Workload.
location Changes to this property will trigger replacement. string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
name string
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
state string
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
uid string
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
updateTime string
Output only. Update time.
workloadId Changes to this property will trigger replacement. string
The Workload identifier.


workloadProperties WorkloadWorkloadProperty[]
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
workloadReferences WorkloadWorkloadReference[]
Reference of an underlying compute resource represented by the Workload. Structure is documented below.
application_id Changes to this property will trigger replacement. str
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
attributes WorkloadAttributesArgs
Consumer provided attributes. Structure is documented below.
create_time str
Output only. Create time.
description str
User-defined description of a Workload.
discovered_workload Changes to this property will trigger replacement. str
Immutable. The resource name of the original discovered workload.
display_name str
User-defined name for the Workload.
location Changes to this property will trigger replacement. str
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
name str
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
project Changes to this property will trigger replacement. str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
state str
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
uid str
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
update_time str
Output only. Update time.
workload_id Changes to this property will trigger replacement. str
The Workload identifier.


workload_properties Sequence[WorkloadWorkloadPropertyArgs]
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
workload_references Sequence[WorkloadWorkloadReferenceArgs]
Reference of an underlying compute resource represented by the Workload. Structure is documented below.
applicationId Changes to this property will trigger replacement. String
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
attributes Property Map
Consumer provided attributes. Structure is documented below.
createTime String
Output only. Create time.
description String
User-defined description of a Workload.
discoveredWorkload Changes to this property will trigger replacement. String
Immutable. The resource name of the original discovered workload.
displayName String
User-defined name for the Workload.
location Changes to this property will trigger replacement. String
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
name String
Identifier. The resource name of the Workload. Format:"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"
project Changes to this property will trigger replacement. String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
state String
Output only. Workload state. Possible values: STATE_UNSPECIFIED CREATING ACTIVE DELETING DETACHED
uid String
Output only. A universally unique identifier (UUID) for the Workload in the UUID4 format.
updateTime String
Output only. Update time.
workloadId Changes to this property will trigger replacement. String
The Workload identifier.


workloadProperties List<Property Map>
Properties of an underlying compute resource represented by the Workload. Structure is documented below.
workloadReferences List<Property Map>
Reference of an underlying compute resource represented by the Workload. Structure is documented below.

Supporting Types

WorkloadAttributes
, WorkloadAttributesArgs

BusinessOwners List<WorkloadAttributesBusinessOwner>
Business team that ensures user needs are met and value is delivered Structure is documented below.
Criticality WorkloadAttributesCriticality
Criticality of the Application, Service, or Workload Structure is documented below.
DeveloperOwners List<WorkloadAttributesDeveloperOwner>
Developer team that owns development and coding. Structure is documented below.
Environment WorkloadAttributesEnvironment
Environment of the Application, Service, or Workload Structure is documented below.
OperatorOwners List<WorkloadAttributesOperatorOwner>
Operator team that ensures runtime and operations. Structure is documented below.
BusinessOwners []WorkloadAttributesBusinessOwner
Business team that ensures user needs are met and value is delivered Structure is documented below.
Criticality WorkloadAttributesCriticality
Criticality of the Application, Service, or Workload Structure is documented below.
DeveloperOwners []WorkloadAttributesDeveloperOwner
Developer team that owns development and coding. Structure is documented below.
Environment WorkloadAttributesEnvironment
Environment of the Application, Service, or Workload Structure is documented below.
OperatorOwners []WorkloadAttributesOperatorOwner
Operator team that ensures runtime and operations. Structure is documented below.
businessOwners List<WorkloadAttributesBusinessOwner>
Business team that ensures user needs are met and value is delivered Structure is documented below.
criticality WorkloadAttributesCriticality
Criticality of the Application, Service, or Workload Structure is documented below.
developerOwners List<WorkloadAttributesDeveloperOwner>
Developer team that owns development and coding. Structure is documented below.
environment WorkloadAttributesEnvironment
Environment of the Application, Service, or Workload Structure is documented below.
operatorOwners List<WorkloadAttributesOperatorOwner>
Operator team that ensures runtime and operations. Structure is documented below.
businessOwners WorkloadAttributesBusinessOwner[]
Business team that ensures user needs are met and value is delivered Structure is documented below.
criticality WorkloadAttributesCriticality
Criticality of the Application, Service, or Workload Structure is documented below.
developerOwners WorkloadAttributesDeveloperOwner[]
Developer team that owns development and coding. Structure is documented below.
environment WorkloadAttributesEnvironment
Environment of the Application, Service, or Workload Structure is documented below.
operatorOwners WorkloadAttributesOperatorOwner[]
Operator team that ensures runtime and operations. Structure is documented below.
business_owners Sequence[WorkloadAttributesBusinessOwner]
Business team that ensures user needs are met and value is delivered Structure is documented below.
criticality WorkloadAttributesCriticality
Criticality of the Application, Service, or Workload Structure is documented below.
developer_owners Sequence[WorkloadAttributesDeveloperOwner]
Developer team that owns development and coding. Structure is documented below.
environment WorkloadAttributesEnvironment
Environment of the Application, Service, or Workload Structure is documented below.
operator_owners Sequence[WorkloadAttributesOperatorOwner]
Operator team that ensures runtime and operations. Structure is documented below.
businessOwners List<Property Map>
Business team that ensures user needs are met and value is delivered Structure is documented below.
criticality Property Map
Criticality of the Application, Service, or Workload Structure is documented below.
developerOwners List<Property Map>
Developer team that owns development and coding. Structure is documented below.
environment Property Map
Environment of the Application, Service, or Workload Structure is documented below.
operatorOwners List<Property Map>
Operator team that ensures runtime and operations. Structure is documented below.

WorkloadAttributesBusinessOwner
, WorkloadAttributesBusinessOwnerArgs

Email This property is required. string
Email address of the contacts.
DisplayName string
Contact's name.
Email This property is required. string
Email address of the contacts.
DisplayName string
Contact's name.
email This property is required. String
Email address of the contacts.
displayName String
Contact's name.
email This property is required. string
Email address of the contacts.
displayName string
Contact's name.
email This property is required. str
Email address of the contacts.
display_name str
Contact's name.
email This property is required. String
Email address of the contacts.
displayName String
Contact's name.

WorkloadAttributesCriticality
, WorkloadAttributesCriticalityArgs

Type This property is required. string
Criticality type. Possible values are: MISSION_CRITICAL, HIGH, MEDIUM, LOW.
Type This property is required. string
Criticality type. Possible values are: MISSION_CRITICAL, HIGH, MEDIUM, LOW.
type This property is required. String
Criticality type. Possible values are: MISSION_CRITICAL, HIGH, MEDIUM, LOW.
type This property is required. string
Criticality type. Possible values are: MISSION_CRITICAL, HIGH, MEDIUM, LOW.
type This property is required. str
Criticality type. Possible values are: MISSION_CRITICAL, HIGH, MEDIUM, LOW.
type This property is required. String
Criticality type. Possible values are: MISSION_CRITICAL, HIGH, MEDIUM, LOW.

WorkloadAttributesDeveloperOwner
, WorkloadAttributesDeveloperOwnerArgs

Email This property is required. string
Email address of the contacts.
DisplayName string
Contact's name.
Email This property is required. string
Email address of the contacts.
DisplayName string
Contact's name.
email This property is required. String
Email address of the contacts.
displayName String
Contact's name.
email This property is required. string
Email address of the contacts.
displayName string
Contact's name.
email This property is required. str
Email address of the contacts.
display_name str
Contact's name.
email This property is required. String
Email address of the contacts.
displayName String
Contact's name.

WorkloadAttributesEnvironment
, WorkloadAttributesEnvironmentArgs

Type This property is required. string
Environment type. Possible values are: PRODUCTION, STAGING, TEST, DEVELOPMENT.
Type This property is required. string
Environment type. Possible values are: PRODUCTION, STAGING, TEST, DEVELOPMENT.
type This property is required. String
Environment type. Possible values are: PRODUCTION, STAGING, TEST, DEVELOPMENT.
type This property is required. string
Environment type. Possible values are: PRODUCTION, STAGING, TEST, DEVELOPMENT.
type This property is required. str
Environment type. Possible values are: PRODUCTION, STAGING, TEST, DEVELOPMENT.
type This property is required. String
Environment type. Possible values are: PRODUCTION, STAGING, TEST, DEVELOPMENT.

WorkloadAttributesOperatorOwner
, WorkloadAttributesOperatorOwnerArgs

Email This property is required. string
Email address of the contacts.
DisplayName string
Contact's name.
Email This property is required. string
Email address of the contacts.
DisplayName string
Contact's name.
email This property is required. String
Email address of the contacts.
displayName String
Contact's name.
email This property is required. string
Email address of the contacts.
displayName string
Contact's name.
email This property is required. str
Email address of the contacts.
display_name str
Contact's name.
email This property is required. String
Email address of the contacts.
displayName String
Contact's name.

WorkloadWorkloadProperty
, WorkloadWorkloadPropertyArgs

GcpProject string
(Output) Output only. The service project identifier that the underlying cloud resource resides in. Empty for non cloud resources.
Location string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
Zone string
(Output) Output only. The location that the underlying compute resource resides in if it is zonal (e.g us-west1-a).
GcpProject string
(Output) Output only. The service project identifier that the underlying cloud resource resides in. Empty for non cloud resources.
Location string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
Zone string
(Output) Output only. The location that the underlying compute resource resides in if it is zonal (e.g us-west1-a).
gcpProject String
(Output) Output only. The service project identifier that the underlying cloud resource resides in. Empty for non cloud resources.
location String
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
zone String
(Output) Output only. The location that the underlying compute resource resides in if it is zonal (e.g us-west1-a).
gcpProject string
(Output) Output only. The service project identifier that the underlying cloud resource resides in. Empty for non cloud resources.
location string
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
zone string
(Output) Output only. The location that the underlying compute resource resides in if it is zonal (e.g us-west1-a).
gcp_project str
(Output) Output only. The service project identifier that the underlying cloud resource resides in. Empty for non cloud resources.
location str
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
zone str
(Output) Output only. The location that the underlying compute resource resides in if it is zonal (e.g us-west1-a).
gcpProject String
(Output) Output only. The service project identifier that the underlying cloud resource resides in. Empty for non cloud resources.
location String
Part of parent. Full resource name of a parent Application. Example: projects/{HOST_PROJECT_ID}/locations/{LOCATION}/applications/{APPLICATION_ID}
zone String
(Output) Output only. The location that the underlying compute resource resides in if it is zonal (e.g us-west1-a).

WorkloadWorkloadReference
, WorkloadWorkloadReferenceArgs

Uri string
(Output) Output only. The underlying compute resource uri.
Uri string
(Output) Output only. The underlying compute resource uri.
uri String
(Output) Output only. The underlying compute resource uri.
uri string
(Output) Output only. The underlying compute resource uri.
uri str
(Output) Output only. The underlying compute resource uri.
uri String
(Output) Output only. The underlying compute resource uri.

Import

Workload can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/applications/{{application_id}}/workloads/{{workload_id}}

  • {{project}}/{{location}}/{{application_id}}/{{workload_id}}

  • {{location}}/{{application_id}}/{{workload_id}}

When using the pulumi import command, Workload can be imported using one of the formats above. For example:

$ pulumi import gcp:apphub/workload:Workload default projects/{{project}}/locations/{{location}}/applications/{{application_id}}/workloads/{{workload_id}}
Copy
$ pulumi import gcp:apphub/workload:Workload default {{project}}/{{location}}/{{application_id}}/{{workload_id}}
Copy
$ pulumi import gcp:apphub/workload:Workload default {{location}}/{{application_id}}/{{workload_id}}
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.