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
new Workload(name: string, args: WorkloadArgs, opts?: CustomResourceOptions);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:
- Account
Id int The New Relic account ID where you want to create the workload.
- Entity
Guids List<string> A list of entity GUIDs manually assigned to this workload.
- Entity
Search List<Pulumi.Queries New Relic. Plugins. Inputs. Workload Entity Search Query Args> 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.
- Scope
Account List<int>Ids A list of account IDs that will be used to get entities from.
- Account
Id int The New Relic account ID where you want to create the workload.
- Entity
Guids []string A list of entity GUIDs manually assigned to this workload.
- Entity
Search []WorkloadQueries Entity Search Query 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.
- Scope
Account []intIds A list of account IDs that will be used to get entities from.
- account
Id number The New Relic account ID where you want to create the workload.
- entity
Guids string[] A list of entity GUIDs manually assigned to this workload.
- entity
Search WorkloadQueries Entity Search Query[] 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.
- scope
Account number[]Ids 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_ List[Workloadqueries Entity Search Query] 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_ List[Integer]ids 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:
- Composite
Entity stringSearch Query 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.
- Workload
Id int The unique entity identifier of the workload.
- Composite
Entity stringSearch Query 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.
- Workload
Id int The unique entity identifier of the workload.
- composite
Entity stringSearch Query 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.
- workload
Id number The unique entity identifier of the workload.
- composite_
entity_ strsearch_ query 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): Workloadstatic 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:
- Account
Id int The New Relic account ID where you want to create the workload.
- Composite
Entity stringSearch Query The composite query used to compose a dynamic workload.
- Entity
Guids List<string> A list of entity GUIDs manually assigned to this workload.
- Entity
Search List<Pulumi.Queries New Relic. Plugins. Inputs. Workload Entity Search Query Args> 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.
- Scope
Account List<int>Ids A list of account IDs that will be used to get entities from.
- Workload
Id int The unique entity identifier of the workload.
- Account
Id int The New Relic account ID where you want to create the workload.
- Composite
Entity stringSearch Query The composite query used to compose a dynamic workload.
- Entity
Guids []string A list of entity GUIDs manually assigned to this workload.
- Entity
Search []WorkloadQueries Entity Search Query 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.
- Scope
Account []intIds A list of account IDs that will be used to get entities from.
- Workload
Id int The unique entity identifier of the workload.
- account
Id number The New Relic account ID where you want to create the workload.
- composite
Entity stringSearch Query The composite query used to compose a dynamic workload.
- entity
Guids string[] A list of entity GUIDs manually assigned to this workload.
- entity
Search WorkloadQueries Entity Search Query[] 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.
- scope
Account number[]Ids A list of account IDs that will be used to get entities from.
- workload
Id 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_ strsearch_ query 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_ List[Workloadqueries Entity Search Query] 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_ List[Integer]ids 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
Package Details
- Repository
- https://github.com/pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.