Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi
gcp.apphub.getDiscoveredWorkload
Explore with Pulumi AI
Get information about a discovered workload from its uri.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my-workload = gcp.apphub.getDiscoveredWorkload({
location: "us-central1",
workloadUri: "my-workload-uri",
});
import pulumi
import pulumi_gcp as gcp
my_workload = gcp.apphub.get_discovered_workload(location="us-central1",
workload_uri="my-workload-uri")
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/apphub"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := apphub.GetDiscoveredWorkload(ctx, &apphub.GetDiscoveredWorkloadArgs{
Location: "us-central1",
WorkloadUri: "my-workload-uri",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_workload = Gcp.Apphub.GetDiscoveredWorkload.Invoke(new()
{
Location = "us-central1",
WorkloadUri = "my-workload-uri",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.apphub.ApphubFunctions;
import com.pulumi.gcp.apphub.inputs.GetDiscoveredWorkloadArgs;
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) {
final var my-workload = ApphubFunctions.getDiscoveredWorkload(GetDiscoveredWorkloadArgs.builder()
.location("us-central1")
.workloadUri("my-workload-uri")
.build());
}
}
variables:
my-workload:
fn::invoke:
Function: gcp:apphub:getDiscoveredWorkload
Arguments:
location: us-central1
workloadUri: my-workload-uri
Using getDiscoveredWorkload
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDiscoveredWorkload(args: GetDiscoveredWorkloadArgs, opts?: InvokeOptions): Promise<GetDiscoveredWorkloadResult>
function getDiscoveredWorkloadOutput(args: GetDiscoveredWorkloadOutputArgs, opts?: InvokeOptions): Output<GetDiscoveredWorkloadResult>
def get_discovered_workload(location: Optional[str] = None,
project: Optional[str] = None,
workload_uri: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDiscoveredWorkloadResult
def get_discovered_workload_output(location: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
workload_uri: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDiscoveredWorkloadResult]
func GetDiscoveredWorkload(ctx *Context, args *GetDiscoveredWorkloadArgs, opts ...InvokeOption) (*GetDiscoveredWorkloadResult, error)
func GetDiscoveredWorkloadOutput(ctx *Context, args *GetDiscoveredWorkloadOutputArgs, opts ...InvokeOption) GetDiscoveredWorkloadResultOutput
> Note: This function is named GetDiscoveredWorkload
in the Go SDK.
public static class GetDiscoveredWorkload
{
public static Task<GetDiscoveredWorkloadResult> InvokeAsync(GetDiscoveredWorkloadArgs args, InvokeOptions? opts = null)
public static Output<GetDiscoveredWorkloadResult> Invoke(GetDiscoveredWorkloadInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDiscoveredWorkloadResult> getDiscoveredWorkload(GetDiscoveredWorkloadArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: gcp:apphub/getDiscoveredWorkload:getDiscoveredWorkload
arguments:
# arguments dictionary
The following arguments are supported:
- Location string
- The location of the discovered workload.
- Workload
Uri string - The uri of the workload (instance group managed by the Instance Group Manager). Example: "//compute.googleapis.com/projects/1/regions/us-east1/instanceGroups/id1"
- Project string
- The host project of the discovered workload.
- Location string
- The location of the discovered workload.
- Workload
Uri string - The uri of the workload (instance group managed by the Instance Group Manager). Example: "//compute.googleapis.com/projects/1/regions/us-east1/instanceGroups/id1"
- Project string
- The host project of the discovered workload.
- location String
- The location of the discovered workload.
- workload
Uri String - The uri of the workload (instance group managed by the Instance Group Manager). Example: "//compute.googleapis.com/projects/1/regions/us-east1/instanceGroups/id1"
- project String
- The host project of the discovered workload.
- location string
- The location of the discovered workload.
- workload
Uri string - The uri of the workload (instance group managed by the Instance Group Manager). Example: "//compute.googleapis.com/projects/1/regions/us-east1/instanceGroups/id1"
- project string
- The host project of the discovered workload.
- location str
- The location of the discovered workload.
- workload_
uri str - The uri of the workload (instance group managed by the Instance Group Manager). Example: "//compute.googleapis.com/projects/1/regions/us-east1/instanceGroups/id1"
- project str
- The host project of the discovered workload.
- location String
- The location of the discovered workload.
- workload
Uri String - The uri of the workload (instance group managed by the Instance Group Manager). Example: "//compute.googleapis.com/projects/1/regions/us-east1/instanceGroups/id1"
- project String
- The host project of the discovered workload.
getDiscoveredWorkload Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The location that the underlying resource resides in.
- Name string
- Resource name of a Workload. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}".
- Workload
Properties List<GetDiscovered Workload Workload Property> - Properties of an underlying compute resource that can comprise a Workload. Structure is documented below
- Workload
References List<GetDiscovered Workload Workload Reference> - Reference to an underlying networking resource that can comprise a Workload. Structure is documented below
- Workload
Uri string - Project string
- Id string
- The provider-assigned unique ID for this managed resource.
- Location string
- The location that the underlying resource resides in.
- Name string
- Resource name of a Workload. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}".
- Workload
Properties []GetDiscovered Workload Workload Property - Properties of an underlying compute resource that can comprise a Workload. Structure is documented below
- Workload
References []GetDiscovered Workload Workload Reference - Reference to an underlying networking resource that can comprise a Workload. Structure is documented below
- Workload
Uri string - Project string
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The location that the underlying resource resides in.
- name String
- Resource name of a Workload. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}".
- workload
Properties List<GetDiscovered Workload Workload Property> - Properties of an underlying compute resource that can comprise a Workload. Structure is documented below
- workload
References List<GetDiscovered Workload Workload Reference> - Reference to an underlying networking resource that can comprise a Workload. Structure is documented below
- workload
Uri String - project String
- id string
- The provider-assigned unique ID for this managed resource.
- location string
- The location that the underlying resource resides in.
- name string
- Resource name of a Workload. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}".
- workload
Properties GetDiscovered Workload Workload Property[] - Properties of an underlying compute resource that can comprise a Workload. Structure is documented below
- workload
References GetDiscovered Workload Workload Reference[] - Reference to an underlying networking resource that can comprise a Workload. Structure is documented below
- workload
Uri string - project string
- id str
- The provider-assigned unique ID for this managed resource.
- location str
- The location that the underlying resource resides in.
- name str
- Resource name of a Workload. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}".
- workload_
properties Sequence[GetDiscovered Workload Workload Property] - Properties of an underlying compute resource that can comprise a Workload. Structure is documented below
- workload_
references Sequence[GetDiscovered Workload Workload Reference] - Reference to an underlying networking resource that can comprise a Workload. Structure is documented below
- workload_
uri str - project str
- id String
- The provider-assigned unique ID for this managed resource.
- location String
- The location that the underlying resource resides in.
- name String
- Resource name of a Workload. Format: "projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}".
- workload
Properties List<Property Map> - Properties of an underlying compute resource that can comprise a Workload. Structure is documented below
- workload
References List<Property Map> - Reference to an underlying networking resource that can comprise a Workload. Structure is documented below
- workload
Uri String - project String
Supporting Types
GetDiscoveredWorkloadWorkloadProperty
- Gcp
Project string - The service project identifier that the underlying cloud resource resides in.
- Location string
- The location of the discovered workload.
- Zone string
- The location that the underlying resource resides in if it is zonal.
- Gcp
Project string - The service project identifier that the underlying cloud resource resides in.
- Location string
- The location of the discovered workload.
- Zone string
- The location that the underlying resource resides in if it is zonal.
- gcp
Project String - The service project identifier that the underlying cloud resource resides in.
- location String
- The location of the discovered workload.
- zone String
- The location that the underlying resource resides in if it is zonal.
- gcp
Project string - The service project identifier that the underlying cloud resource resides in.
- location string
- The location of the discovered workload.
- zone string
- The location that the underlying resource resides in if it is zonal.
- gcp_
project str - The service project identifier that the underlying cloud resource resides in.
- location str
- The location of the discovered workload.
- zone str
- The location that the underlying resource resides in if it is zonal.
- gcp
Project String - The service project identifier that the underlying cloud resource resides in.
- location String
- The location of the discovered workload.
- zone String
- The location that the underlying resource resides in if it is zonal.
GetDiscoveredWorkloadWorkloadReference
- Uri string
- The underlying resource URI.
- Uri string
- The underlying resource URI.
- uri String
- The underlying resource URI.
- uri string
- The underlying resource URI.
- uri str
- The underlying resource URI.
- uri String
- The underlying resource URI.
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.