Class 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 provider_api_key
attribute in the provider block or the NEWRELIC_PERSONAL_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,
},
});
}
}
Inherited Members
Namespace: Pulumi.NewRelic.Plugins
Assembly: Pulumi.NewRelic.dll
Syntax
public class Workload : CustomResource
Constructors
View SourceWorkload(String, WorkloadArgs, CustomResourceOptions)
Create a Workload resource with the given unique name, arguments, and options.
Declaration
public Workload(string name, WorkloadArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| WorkloadArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceAccountId
The New Relic account ID where you want to create the workload.
Declaration
public Output<int> AccountId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
CompositeEntitySearchQuery
The composite query used to compose a dynamic workload.
Declaration
public Output<string> CompositeEntitySearchQuery { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
EntityGuids
A list of entity GUIDs manually assigned to this workload.
Declaration
public Output<ImmutableArray<string>> EntityGuids { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
EntitySearchQueries
A list of search queries that define a dynamic workload. See Nested entity_search_query blocks below for details.
Declaration
public Output<ImmutableArray<WorkloadEntitySearchQuery>> EntitySearchQueries { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<WorkloadEntitySearchQuery>> |
Guid
The unique entity identifier of the workload in New Relic.
Declaration
public Output<string> Guid { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
The workload's name.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Permalink
The URL of the workload.
Declaration
public Output<string> Permalink { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
ScopeAccountIds
A list of account IDs that will be used to get entities from.
Declaration
public Output<ImmutableArray<int>> ScopeAccountIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.Int32>> |
WorkloadId
The unique entity identifier of the workload.
Declaration
public Output<int> WorkloadId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Methods
View SourceGet(String, Input<String>, WorkloadState, CustomResourceOptions)
Get an existing Workload resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static Workload Get(string name, Input<string> id, WorkloadState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| WorkloadState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| Workload |