Workload

Use this resource to create, update, and delete a New Relic One workload.

A New Relic Personal API key is required to provision this resource. Set the api_key attribute in the provider block or the NEW_RELIC_API_KEY environment variable with your Personal API key.

Example Usage

using Pulumi;
using NewRelic = Pulumi.NewRelic;

class MyStack : Stack
{
    public MyStack()
    {
        var foo = new NewRelic.Plugins.Workload("foo", new NewRelic.Plugins.WorkloadArgs
        {
            AccountId = 12345678,
            EntityGuids = 
            {
                "MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1",
            },
            EntitySearchQueries = 
            {
                new NewRelic.Plugins.Inputs.WorkloadEntitySearchQueryArgs
                {
                    Query = "name like 'Example application'",
                },
            },
            ScopeAccountIds = 
            {
                12345678,
            },
        });
    }

}

Coming soon!

import pulumi
import pulumi_newrelic as newrelic

foo = newrelic.plugins.Workload("foo",
    account_id=12345678,
    entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
    entity_search_queries=[{
        "query": "name like 'Example application'",
    }],
    scope_account_ids=[12345678])
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";

const foo = new newrelic.plugins.Workload("foo", {
    accountId: 12345678,
    entityGuids: ["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
    entitySearchQueries: [{
        query: "name like 'Example application'",
    }],
    scopeAccountIds: [12345678],
});

Create a Workload Resource

def Workload(resource_name, opts=None, account_id=None, entity_guids=None, entity_search_queries=None, name=None, scope_account_ids=None, __props__=None);
func NewWorkload(ctx *Context, name string, args WorkloadArgs, opts ...ResourceOption) (*Workload, error)
public Workload(string name, WorkloadArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args WorkloadArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args WorkloadArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args WorkloadArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Workload Resource Properties

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

Inputs

The Workload resource accepts the following input properties:

AccountId int

The New Relic account ID where you want to create the workload.

EntityGuids List<string>

A list of entity GUIDs manually assigned to this workload.

EntitySearchQueries List<Pulumi.NewRelic.Plugins.Inputs.WorkloadEntitySearchQueryArgs>

A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.

Name string

The workload’s name.

ScopeAccountIds List<int>

A list of account IDs that will be used to get entities from.

AccountId int

The New Relic account ID where you want to create the workload.

EntityGuids []string

A list of entity GUIDs manually assigned to this workload.

EntitySearchQueries []WorkloadEntitySearchQuery

A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.

Name string

The workload’s name.

ScopeAccountIds []int

A list of account IDs that will be used to get entities from.

accountId number

The New Relic account ID where you want to create the workload.

entityGuids string[]

A list of entity GUIDs manually assigned to this workload.

entitySearchQueries WorkloadEntitySearchQuery[]

A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.

name string

The workload’s name.

scopeAccountIds number[]

A list of account IDs that will be used to get entities from.

account_id float

The New Relic account ID where you want to create the workload.

entity_guids List[str]

A list of entity GUIDs manually assigned to this workload.

entity_search_queries List[WorkloadEntitySearchQuery]

A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.

name str

The workload’s name.

scope_account_ids List[Integer]

A list of account IDs that will be used to get entities from.

Outputs

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

CompositeEntitySearchQuery string

The composite query used to compose a dynamic workload.

Guid string

The unique entity identifier of the workload in New Relic.

Id string
The provider-assigned unique ID for this managed resource.
Permalink string

The URL of the workload.

WorkloadId int

The unique entity identifier of the workload.

CompositeEntitySearchQuery string

The composite query used to compose a dynamic workload.

Guid string

The unique entity identifier of the workload in New Relic.

Id string
The provider-assigned unique ID for this managed resource.
Permalink string

The URL of the workload.

WorkloadId int

The unique entity identifier of the workload.

compositeEntitySearchQuery string

The composite query used to compose a dynamic workload.

guid string

The unique entity identifier of the workload in New Relic.

id string
The provider-assigned unique ID for this managed resource.
permalink string

The URL of the workload.

workloadId number

The unique entity identifier of the workload.

composite_entity_search_query str

The composite query used to compose a dynamic workload.

guid str

The unique entity identifier of the workload in New Relic.

id str
The provider-assigned unique ID for this managed resource.
permalink str

The URL of the workload.

workload_id float

The unique entity identifier of the workload.

Look up an 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
static get(resource_name, id, opts=None, account_id=None, composite_entity_search_query=None, entity_guids=None, entity_search_queries=None, guid=None, name=None, permalink=None, scope_account_ids=None, workload_id=None, __props__=None);
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)
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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:

AccountId int

The New Relic account ID where you want to create the workload.

CompositeEntitySearchQuery string

The composite query used to compose a dynamic workload.

EntityGuids List<string>

A list of entity GUIDs manually assigned to this workload.

EntitySearchQueries List<Pulumi.NewRelic.Plugins.Inputs.WorkloadEntitySearchQueryArgs>

A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.

Guid string

The unique entity identifier of the workload in New Relic.

Name string

The workload’s name.

Permalink string

The URL of the workload.

ScopeAccountIds List<int>

A list of account IDs that will be used to get entities from.

WorkloadId int

The unique entity identifier of the workload.

AccountId int

The New Relic account ID where you want to create the workload.

CompositeEntitySearchQuery string

The composite query used to compose a dynamic workload.

EntityGuids []string

A list of entity GUIDs manually assigned to this workload.

EntitySearchQueries []WorkloadEntitySearchQuery

A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.

Guid string

The unique entity identifier of the workload in New Relic.

Name string

The workload’s name.

Permalink string

The URL of the workload.

ScopeAccountIds []int

A list of account IDs that will be used to get entities from.

WorkloadId int

The unique entity identifier of the workload.

accountId number

The New Relic account ID where you want to create the workload.

compositeEntitySearchQuery string

The composite query used to compose a dynamic workload.

entityGuids string[]

A list of entity GUIDs manually assigned to this workload.

entitySearchQueries WorkloadEntitySearchQuery[]

A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.

guid string

The unique entity identifier of the workload in New Relic.

name string

The workload’s name.

permalink string

The URL of the workload.

scopeAccountIds number[]

A list of account IDs that will be used to get entities from.

workloadId number

The unique entity identifier of the workload.

account_id float

The New Relic account ID where you want to create the workload.

composite_entity_search_query str

The composite query used to compose a dynamic workload.

entity_guids List[str]

A list of entity GUIDs manually assigned to this workload.

entity_search_queries List[WorkloadEntitySearchQuery]

A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.

guid str

The unique entity identifier of the workload in New Relic.

name str

The workload’s name.

permalink str

The URL of the workload.

scope_account_ids List[Integer]

A list of account IDs that will be used to get entities from.

workload_id float

The unique entity identifier of the workload.

Supporting Types

WorkloadEntitySearchQuery

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Query string

The query.

Query string

The query.

query string

The query.

query str

The query.

Package Details

Repository
https://github.com/pulumi/pulumi-newrelic
License
Apache-2.0
Notes
This Pulumi package is based on the newrelic Terraform Provider.