1. Packages
  2. Grafana Cloud
  3. API Docs
  4. cloudProvider
  5. AwsResourceMetadataScrapeJob
Grafana v0.19.2 published on Friday, Jul 18, 2025 by pulumiverse

grafana.cloudProvider.AwsResourceMetadataScrapeJob

Explore with Pulumi AI

grafana logo
Grafana v0.19.2 published on Friday, Jul 18, 2025 by pulumiverse

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    import * as grafana from "@pulumiverse/grafana";
    
    const test = grafana.cloud.getStack({
        slug: "gcloudstacktest",
    });
    const testGetRole = aws.iam.getRole({
        name: "my-role",
    });
    const testAwsAccount = new grafana.cloudprovider.AwsAccount("test", {
        stackId: test.then(test => test.id),
        roleArn: testGetRole.then(testGetRole => testGetRole.arn),
        regions: [
            "us-east-1",
            "us-east-2",
            "us-west-1",
        ],
    });
    const testAwsResourceMetadataScrapeJob = new grafana.cloudprovider.AwsResourceMetadataScrapeJob("test", {
        stackId: test.then(test => test.id),
        name: "my-aws-resource-metadata-scrape-job",
        awsAccountResourceId: testAwsAccount.resourceId,
        services: [{
            name: "AWS/EC2",
            scrapeIntervalSeconds: 300,
            resourceDiscoveryTagFilters: [{
                key: "k8s.io/cluster-autoscaler/enabled",
                value: "true",
            }],
        }],
        staticLabels: {
            label1: "value1",
            label2: "value2",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    import pulumi_grafana as grafana
    import pulumiverse_grafana as grafana
    
    test = grafana.cloud.get_stack(slug="gcloudstacktest")
    test_get_role = aws.iam.get_role(name="my-role")
    test_aws_account = grafana.cloud_provider.AwsAccount("test",
        stack_id=test.id,
        role_arn=test_get_role.arn,
        regions=[
            "us-east-1",
            "us-east-2",
            "us-west-1",
        ])
    test_aws_resource_metadata_scrape_job = grafana.cloud_provider.AwsResourceMetadataScrapeJob("test",
        stack_id=test.id,
        name="my-aws-resource-metadata-scrape-job",
        aws_account_resource_id=test_aws_account.resource_id,
        services=[{
            "name": "AWS/EC2",
            "scrape_interval_seconds": 300,
            "resource_discovery_tag_filters": [{
                "key": "k8s.io/cluster-autoscaler/enabled",
                "value": "true",
            }],
        }],
        static_labels={
            "label1": "value1",
            "label2": "value2",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/cloud"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana/cloudprovider"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		test, err := cloud.LookupStack(ctx, &cloud.LookupStackArgs{
    			Slug: "gcloudstacktest",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		testGetRole, err := iam.LookupRole(ctx, &iam.LookupRoleArgs{
    			Name: "my-role",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		testAwsAccount, err := cloudprovider.NewAwsAccount(ctx, "test", &cloudprovider.AwsAccountArgs{
    			StackId: pulumi.String(test.Id),
    			RoleArn: pulumi.String(testGetRole.Arn),
    			Regions: pulumi.StringArray{
    				pulumi.String("us-east-1"),
    				pulumi.String("us-east-2"),
    				pulumi.String("us-west-1"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cloudprovider.NewAwsResourceMetadataScrapeJob(ctx, "test", &cloudprovider.AwsResourceMetadataScrapeJobArgs{
    			StackId:              pulumi.String(test.Id),
    			Name:                 pulumi.String("my-aws-resource-metadata-scrape-job"),
    			AwsAccountResourceId: testAwsAccount.ResourceId,
    			Services: cloudprovider.AwsResourceMetadataScrapeJobServiceArray{
    				&cloudprovider.AwsResourceMetadataScrapeJobServiceArgs{
    					Name:                  pulumi.String("AWS/EC2"),
    					ScrapeIntervalSeconds: pulumi.Int(300),
    					ResourceDiscoveryTagFilters: cloudprovider.AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilterArray{
    						&cloudprovider.AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilterArgs{
    							Key:   pulumi.String("k8s.io/cluster-autoscaler/enabled"),
    							Value: pulumi.String("true"),
    						},
    					},
    				},
    			},
    			StaticLabels: pulumi.StringMap{
    				"label1": pulumi.String("value1"),
    				"label2": pulumi.String("value2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    using Grafana = Pulumi.Grafana;
    using Grafana = Pulumiverse.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Grafana.Cloud.GetStack.Invoke(new()
        {
            Slug = "gcloudstacktest",
        });
    
        var testGetRole = Aws.Iam.GetRole.Invoke(new()
        {
            Name = "my-role",
        });
    
        var testAwsAccount = new Grafana.CloudProvider.AwsAccount("test", new()
        {
            StackId = test.Apply(getStackResult => getStackResult.Id),
            RoleArn = testGetRole.Apply(getRoleResult => getRoleResult.Arn),
            Regions = new[]
            {
                "us-east-1",
                "us-east-2",
                "us-west-1",
            },
        });
    
        var testAwsResourceMetadataScrapeJob = new Grafana.CloudProvider.AwsResourceMetadataScrapeJob("test", new()
        {
            StackId = test.Apply(getStackResult => getStackResult.Id),
            Name = "my-aws-resource-metadata-scrape-job",
            AwsAccountResourceId = testAwsAccount.ResourceId,
            Services = new[]
            {
                new Grafana.CloudProvider.Inputs.AwsResourceMetadataScrapeJobServiceArgs
                {
                    Name = "AWS/EC2",
                    ScrapeIntervalSeconds = 300,
                    ResourceDiscoveryTagFilters = new[]
                    {
                        new Grafana.CloudProvider.Inputs.AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilterArgs
                        {
                            Key = "k8s.io/cluster-autoscaler/enabled",
                            Value = "true",
                        },
                    },
                },
            },
            StaticLabels = 
            {
                { "label1", "value1" },
                { "label2", "value2" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.cloud.CloudFunctions;
    import com.pulumi.grafana.cloud.inputs.GetStackArgs;
    import com.pulumi.aws.iam.IamFunctions;
    import com.pulumi.aws.iam.inputs.GetRoleArgs;
    import com.pulumi.grafana.cloudProvider.AwsAccount;
    import com.pulumi.grafana.cloudProvider.AwsAccountArgs;
    import com.pulumi.grafana.cloudProvider.AwsResourceMetadataScrapeJob;
    import com.pulumi.grafana.cloudProvider.AwsResourceMetadataScrapeJobArgs;
    import com.pulumi.grafana.cloudProvider.inputs.AwsResourceMetadataScrapeJobServiceArgs;
    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 test = CloudFunctions.getStack(GetStackArgs.builder()
                .slug("gcloudstacktest")
                .build());
    
            final var testGetRole = IamFunctions.getRole(GetRoleArgs.builder()
                .name("my-role")
                .build());
    
            var testAwsAccount = new AwsAccount("testAwsAccount", AwsAccountArgs.builder()
                .stackId(test.id())
                .roleArn(testGetRole.arn())
                .regions(            
                    "us-east-1",
                    "us-east-2",
                    "us-west-1")
                .build());
    
            var testAwsResourceMetadataScrapeJob = new AwsResourceMetadataScrapeJob("testAwsResourceMetadataScrapeJob", AwsResourceMetadataScrapeJobArgs.builder()
                .stackId(test.id())
                .name("my-aws-resource-metadata-scrape-job")
                .awsAccountResourceId(testAwsAccount.resourceId())
                .services(AwsResourceMetadataScrapeJobServiceArgs.builder()
                    .name("AWS/EC2")
                    .scrapeIntervalSeconds(300)
                    .resourceDiscoveryTagFilters(AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilterArgs.builder()
                        .key("k8s.io/cluster-autoscaler/enabled")
                        .value("true")
                        .build())
                    .build())
                .staticLabels(Map.ofEntries(
                    Map.entry("label1", "value1"),
                    Map.entry("label2", "value2")
                ))
                .build());
    
        }
    }
    
    resources:
      testAwsAccount:
        type: grafana:cloudProvider:AwsAccount
        name: test
        properties:
          stackId: ${test.id}
          roleArn: ${testGetRole.arn}
          regions:
            - us-east-1
            - us-east-2
            - us-west-1
      testAwsResourceMetadataScrapeJob:
        type: grafana:cloudProvider:AwsResourceMetadataScrapeJob
        name: test
        properties:
          stackId: ${test.id}
          name: my-aws-resource-metadata-scrape-job
          awsAccountResourceId: ${testAwsAccount.resourceId}
          services:
            - name: AWS/EC2
              scrapeIntervalSeconds: 300
              resourceDiscoveryTagFilters:
                - key: k8s.io/cluster-autoscaler/enabled
                  value: 'true'
          staticLabels:
            label1: value1
            label2: value2
    variables:
      test:
        fn::invoke:
          function: grafana:cloud:getStack
          arguments:
            slug: gcloudstacktest
      testGetRole:
        fn::invoke:
          function: aws:iam:getRole
          arguments:
            name: my-role
    

    Create AwsResourceMetadataScrapeJob Resource

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

    Constructor syntax

    new AwsResourceMetadataScrapeJob(name: string, args: AwsResourceMetadataScrapeJobArgs, opts?: CustomResourceOptions);
    @overload
    def AwsResourceMetadataScrapeJob(resource_name: str,
                                     args: AwsResourceMetadataScrapeJobArgs,
                                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def AwsResourceMetadataScrapeJob(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     aws_account_resource_id: Optional[str] = None,
                                     stack_id: Optional[str] = None,
                                     enabled: Optional[bool] = None,
                                     name: Optional[str] = None,
                                     regions_subset_overrides: Optional[Sequence[str]] = None,
                                     services: Optional[Sequence[AwsResourceMetadataScrapeJobServiceArgs]] = None,
                                     static_labels: Optional[Mapping[str, str]] = None)
    func NewAwsResourceMetadataScrapeJob(ctx *Context, name string, args AwsResourceMetadataScrapeJobArgs, opts ...ResourceOption) (*AwsResourceMetadataScrapeJob, error)
    public AwsResourceMetadataScrapeJob(string name, AwsResourceMetadataScrapeJobArgs args, CustomResourceOptions? opts = null)
    public AwsResourceMetadataScrapeJob(String name, AwsResourceMetadataScrapeJobArgs args)
    public AwsResourceMetadataScrapeJob(String name, AwsResourceMetadataScrapeJobArgs args, CustomResourceOptions options)
    
    type: grafana:cloudProvider:AwsResourceMetadataScrapeJob
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AwsResourceMetadataScrapeJobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AwsResourceMetadataScrapeJobArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AwsResourceMetadataScrapeJobArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AwsResourceMetadataScrapeJobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AwsResourceMetadataScrapeJobArgs
    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 awsResourceMetadataScrapeJobResource = new Grafana.CloudProvider.AwsResourceMetadataScrapeJob("awsResourceMetadataScrapeJobResource", new()
    {
        AwsAccountResourceId = "string",
        StackId = "string",
        Enabled = false,
        Name = "string",
        RegionsSubsetOverrides = new[]
        {
            "string",
        },
        Services = new[]
        {
            new Grafana.CloudProvider.Inputs.AwsResourceMetadataScrapeJobServiceArgs
            {
                Name = "string",
                ResourceDiscoveryTagFilters = new[]
                {
                    new Grafana.CloudProvider.Inputs.AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilterArgs
                    {
                        Key = "string",
                        Value = "string",
                    },
                },
                ScrapeIntervalSeconds = 0,
            },
        },
        StaticLabels = 
        {
            { "string", "string" },
        },
    });
    
    example, err := cloudprovider.NewAwsResourceMetadataScrapeJob(ctx, "awsResourceMetadataScrapeJobResource", &cloudprovider.AwsResourceMetadataScrapeJobArgs{
    	AwsAccountResourceId: pulumi.String("string"),
    	StackId:              pulumi.String("string"),
    	Enabled:              pulumi.Bool(false),
    	Name:                 pulumi.String("string"),
    	RegionsSubsetOverrides: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Services: cloudprovider.AwsResourceMetadataScrapeJobServiceArray{
    		&cloudprovider.AwsResourceMetadataScrapeJobServiceArgs{
    			Name: pulumi.String("string"),
    			ResourceDiscoveryTagFilters: cloudprovider.AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilterArray{
    				&cloudprovider.AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilterArgs{
    					Key:   pulumi.String("string"),
    					Value: pulumi.String("string"),
    				},
    			},
    			ScrapeIntervalSeconds: pulumi.Int(0),
    		},
    	},
    	StaticLabels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var awsResourceMetadataScrapeJobResource = new AwsResourceMetadataScrapeJob("awsResourceMetadataScrapeJobResource", AwsResourceMetadataScrapeJobArgs.builder()
        .awsAccountResourceId("string")
        .stackId("string")
        .enabled(false)
        .name("string")
        .regionsSubsetOverrides("string")
        .services(AwsResourceMetadataScrapeJobServiceArgs.builder()
            .name("string")
            .resourceDiscoveryTagFilters(AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilterArgs.builder()
                .key("string")
                .value("string")
                .build())
            .scrapeIntervalSeconds(0)
            .build())
        .staticLabels(Map.of("string", "string"))
        .build());
    
    aws_resource_metadata_scrape_job_resource = grafana.cloudprovider.AwsResourceMetadataScrapeJob("awsResourceMetadataScrapeJobResource",
        aws_account_resource_id="string",
        stack_id="string",
        enabled=False,
        name="string",
        regions_subset_overrides=["string"],
        services=[{
            "name": "string",
            "resource_discovery_tag_filters": [{
                "key": "string",
                "value": "string",
            }],
            "scrape_interval_seconds": 0,
        }],
        static_labels={
            "string": "string",
        })
    
    const awsResourceMetadataScrapeJobResource = new grafana.cloudprovider.AwsResourceMetadataScrapeJob("awsResourceMetadataScrapeJobResource", {
        awsAccountResourceId: "string",
        stackId: "string",
        enabled: false,
        name: "string",
        regionsSubsetOverrides: ["string"],
        services: [{
            name: "string",
            resourceDiscoveryTagFilters: [{
                key: "string",
                value: "string",
            }],
            scrapeIntervalSeconds: 0,
        }],
        staticLabels: {
            string: "string",
        },
    });
    
    type: grafana:cloudProvider:AwsResourceMetadataScrapeJob
    properties:
        awsAccountResourceId: string
        enabled: false
        name: string
        regionsSubsetOverrides:
            - string
        services:
            - name: string
              resourceDiscoveryTagFilters:
                - key: string
                  value: string
              scrapeIntervalSeconds: 0
        stackId: string
        staticLabels:
            string: string
    

    AwsResourceMetadataScrapeJob 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 AwsResourceMetadataScrapeJob resource accepts the following input properties:

    AwsAccountResourceId string
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    StackId string
    Enabled bool
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    Name string
    RegionsSubsetOverrides List<string>
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    Services List<Pulumiverse.Grafana.CloudProvider.Inputs.AwsResourceMetadataScrapeJobService>
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    StaticLabels Dictionary<string, string>
    A set of static labels to add to all metrics exported by this scrape job.
    AwsAccountResourceId string
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    StackId string
    Enabled bool
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    Name string
    RegionsSubsetOverrides []string
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    Services []AwsResourceMetadataScrapeJobServiceArgs
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    StaticLabels map[string]string
    A set of static labels to add to all metrics exported by this scrape job.
    awsAccountResourceId String
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    stackId String
    enabled Boolean
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    name String
    regionsSubsetOverrides List<String>
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    services List<AwsResourceMetadataScrapeJobService>
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    staticLabels Map<String,String>
    A set of static labels to add to all metrics exported by this scrape job.
    awsAccountResourceId string
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    stackId string
    enabled boolean
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    name string
    regionsSubsetOverrides string[]
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    services AwsResourceMetadataScrapeJobService[]
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    staticLabels {[key: string]: string}
    A set of static labels to add to all metrics exported by this scrape job.
    aws_account_resource_id str
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    stack_id str
    enabled bool
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    name str
    regions_subset_overrides Sequence[str]
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    services Sequence[AwsResourceMetadataScrapeJobServiceArgs]
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    static_labels Mapping[str, str]
    A set of static labels to add to all metrics exported by this scrape job.
    awsAccountResourceId String
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    stackId String
    enabled Boolean
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    name String
    regionsSubsetOverrides List<String>
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    services List<Property Map>
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    staticLabels Map<String>
    A set of static labels to add to all metrics exported by this scrape job.

    Outputs

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

    DisabledReason string
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    Id string
    The provider-assigned unique ID for this managed resource.
    DisabledReason string
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    Id string
    The provider-assigned unique ID for this managed resource.
    disabledReason String
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    id String
    The provider-assigned unique ID for this managed resource.
    disabledReason string
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    id string
    The provider-assigned unique ID for this managed resource.
    disabled_reason str
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    id str
    The provider-assigned unique ID for this managed resource.
    disabledReason String
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AwsResourceMetadataScrapeJob Resource

    Get an existing AwsResourceMetadataScrapeJob 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?: AwsResourceMetadataScrapeJobState, opts?: CustomResourceOptions): AwsResourceMetadataScrapeJob
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aws_account_resource_id: Optional[str] = None,
            disabled_reason: Optional[str] = None,
            enabled: Optional[bool] = None,
            name: Optional[str] = None,
            regions_subset_overrides: Optional[Sequence[str]] = None,
            services: Optional[Sequence[AwsResourceMetadataScrapeJobServiceArgs]] = None,
            stack_id: Optional[str] = None,
            static_labels: Optional[Mapping[str, str]] = None) -> AwsResourceMetadataScrapeJob
    func GetAwsResourceMetadataScrapeJob(ctx *Context, name string, id IDInput, state *AwsResourceMetadataScrapeJobState, opts ...ResourceOption) (*AwsResourceMetadataScrapeJob, error)
    public static AwsResourceMetadataScrapeJob Get(string name, Input<string> id, AwsResourceMetadataScrapeJobState? state, CustomResourceOptions? opts = null)
    public static AwsResourceMetadataScrapeJob get(String name, Output<String> id, AwsResourceMetadataScrapeJobState state, CustomResourceOptions options)
    resources:  _:    type: grafana:cloudProvider:AwsResourceMetadataScrapeJob    get:      id: ${id}
    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.
    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:
    AwsAccountResourceId string
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    DisabledReason string
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    Enabled bool
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    Name string
    RegionsSubsetOverrides List<string>
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    Services List<Pulumiverse.Grafana.CloudProvider.Inputs.AwsResourceMetadataScrapeJobService>
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    StackId string
    StaticLabels Dictionary<string, string>
    A set of static labels to add to all metrics exported by this scrape job.
    AwsAccountResourceId string
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    DisabledReason string
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    Enabled bool
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    Name string
    RegionsSubsetOverrides []string
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    Services []AwsResourceMetadataScrapeJobServiceArgs
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    StackId string
    StaticLabels map[string]string
    A set of static labels to add to all metrics exported by this scrape job.
    awsAccountResourceId String
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    disabledReason String
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    enabled Boolean
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    name String
    regionsSubsetOverrides List<String>
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    services List<AwsResourceMetadataScrapeJobService>
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    stackId String
    staticLabels Map<String,String>
    A set of static labels to add to all metrics exported by this scrape job.
    awsAccountResourceId string
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    disabledReason string
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    enabled boolean
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    name string
    regionsSubsetOverrides string[]
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    services AwsResourceMetadataScrapeJobService[]
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    stackId string
    staticLabels {[key: string]: string}
    A set of static labels to add to all metrics exported by this scrape job.
    aws_account_resource_id str
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    disabled_reason str
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    enabled bool
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    name str
    regions_subset_overrides Sequence[str]
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    services Sequence[AwsResourceMetadataScrapeJobServiceArgs]
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    stack_id str
    static_labels Mapping[str, str]
    A set of static labels to add to all metrics exported by this scrape job.
    awsAccountResourceId String
    The ID assigned by the Grafana Cloud Provider API to an AWS Account resource that should be associated with this Resource Metadata Scrape Job. This can be provided by the resource_id attribute of the grafana.cloudProvider.AwsAccount resource.
    disabledReason String
    When the AWS Resource Metadata Scrape Job is disabled, this will show the reason that it is in that state.
    enabled Boolean
    Whether the AWS Resource Metadata Scrape Job is enabled or not. Defaults to true.
    name String
    regionsSubsetOverrides List<String>
    A subset of the regions that are configured in the associated AWS Account resource to apply to this scrape job. If not set or empty, all of the Account resource's regions are scraped.
    services List<Property Map>
    One or more configuration blocks to configure AWS services for the Resource Metadata Scrape Job to scrape. Each block must have a distinct name attribute. When accessing this as an attribute reference, it is a list of objects.
    stackId String
    staticLabels Map<String>
    A set of static labels to add to all metrics exported by this scrape job.

    Supporting Types

    AwsResourceMetadataScrapeJobService, AwsResourceMetadataScrapeJobServiceArgs

    Name string
    The name of the service to scrape. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported services.
    ResourceDiscoveryTagFilters List<Pulumiverse.Grafana.CloudProvider.Inputs.AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilter>
    One or more configuration blocks to configure tag filters applied to discovery of resource entities in the associated AWS account. When accessing this as an attribute reference, it is a list of objects.
    ScrapeIntervalSeconds int
    The interval in seconds to scrape the service. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported scrape intervals. Defaults to 300.
    Name string
    The name of the service to scrape. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported services.
    ResourceDiscoveryTagFilters []AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilter
    One or more configuration blocks to configure tag filters applied to discovery of resource entities in the associated AWS account. When accessing this as an attribute reference, it is a list of objects.
    ScrapeIntervalSeconds int
    The interval in seconds to scrape the service. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported scrape intervals. Defaults to 300.
    name String
    The name of the service to scrape. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported services.
    resourceDiscoveryTagFilters List<AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilter>
    One or more configuration blocks to configure tag filters applied to discovery of resource entities in the associated AWS account. When accessing this as an attribute reference, it is a list of objects.
    scrapeIntervalSeconds Integer
    The interval in seconds to scrape the service. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported scrape intervals. Defaults to 300.
    name string
    The name of the service to scrape. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported services.
    resourceDiscoveryTagFilters AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilter[]
    One or more configuration blocks to configure tag filters applied to discovery of resource entities in the associated AWS account. When accessing this as an attribute reference, it is a list of objects.
    scrapeIntervalSeconds number
    The interval in seconds to scrape the service. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported scrape intervals. Defaults to 300.
    name str
    The name of the service to scrape. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported services.
    resource_discovery_tag_filters Sequence[AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilter]
    One or more configuration blocks to configure tag filters applied to discovery of resource entities in the associated AWS account. When accessing this as an attribute reference, it is a list of objects.
    scrape_interval_seconds int
    The interval in seconds to scrape the service. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported scrape intervals. Defaults to 300.
    name String
    The name of the service to scrape. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported services.
    resourceDiscoveryTagFilters List<Property Map>
    One or more configuration blocks to configure tag filters applied to discovery of resource entities in the associated AWS account. When accessing this as an attribute reference, it is a list of objects.
    scrapeIntervalSeconds Number
    The interval in seconds to scrape the service. See https://grafana.com/docs/grafana-cloud/monitor-infrastructure/monitor-cloud-provider/aws/cloudwatch-metrics/services/ for supported scrape intervals. Defaults to 300.

    AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilter, AwsResourceMetadataScrapeJobServiceResourceDiscoveryTagFilterArgs

    Key string
    The key of the tag filter.
    Value string
    The value of the tag filter.
    Key string
    The key of the tag filter.
    Value string
    The value of the tag filter.
    key String
    The key of the tag filter.
    value String
    The value of the tag filter.
    key string
    The key of the tag filter.
    value string
    The value of the tag filter.
    key str
    The key of the tag filter.
    value str
    The value of the tag filter.
    key String
    The key of the tag filter.
    value String
    The value of the tag filter.

    Import

    $ pulumi import grafana:cloudProvider/awsResourceMetadataScrapeJob:AwsResourceMetadataScrapeJob name "{{ stack_id }}:{{ name }}"
    

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

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v0.19.2 published on Friday, Jul 18, 2025 by pulumiverse