1. Packages
  2. Grafana Cloud
  3. API Docs
  4. ConnectionsMetricsEndpointScrapeJob
Grafana v0.7.1 published on Monday, Nov 25, 2024 by pulumiverse

grafana.ConnectionsMetricsEndpointScrapeJob

Explore with Pulumi AI

grafana logo
Grafana v0.7.1 published on Monday, Nov 25, 2024 by pulumiverse

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as grafana from "@pulumiverse/grafana";
    
    const test = new grafana.ConnectionsMetricsEndpointScrapeJob("test", {
        stackId: "1",
        name: "my-scrape-job",
        enabled: true,
        authenticationMethod: "basic",
        authenticationBasicUsername: "my-username",
        authenticationBasicPassword: "my-password",
        url: "https://grafana.com/metrics",
        scrapeIntervalSeconds: 120,
    });
    
    import pulumi
    import pulumiverse_grafana as grafana
    
    test = grafana.ConnectionsMetricsEndpointScrapeJob("test",
        stack_id="1",
        name="my-scrape-job",
        enabled=True,
        authentication_method="basic",
        authentication_basic_username="my-username",
        authentication_basic_password="my-password",
        url="https://grafana.com/metrics",
        scrape_interval_seconds=120)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-grafana/sdk/go/grafana"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := grafana.NewConnectionsMetricsEndpointScrapeJob(ctx, "test", &grafana.ConnectionsMetricsEndpointScrapeJobArgs{
    			StackId:                     pulumi.String("1"),
    			Name:                        pulumi.String("my-scrape-job"),
    			Enabled:                     pulumi.Bool(true),
    			AuthenticationMethod:        pulumi.String("basic"),
    			AuthenticationBasicUsername: pulumi.String("my-username"),
    			AuthenticationBasicPassword: pulumi.String("my-password"),
    			Url:                         pulumi.String("https://grafana.com/metrics"),
    			ScrapeIntervalSeconds:       pulumi.Int(120),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Grafana = Pulumiverse.Grafana;
    
    return await Deployment.RunAsync(() => 
    {
        var test = new Grafana.ConnectionsMetricsEndpointScrapeJob("test", new()
        {
            StackId = "1",
            Name = "my-scrape-job",
            Enabled = true,
            AuthenticationMethod = "basic",
            AuthenticationBasicUsername = "my-username",
            AuthenticationBasicPassword = "my-password",
            Url = "https://grafana.com/metrics",
            ScrapeIntervalSeconds = 120,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.grafana.ConnectionsMetricsEndpointScrapeJob;
    import com.pulumi.grafana.ConnectionsMetricsEndpointScrapeJobArgs;
    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) {
            var test = new ConnectionsMetricsEndpointScrapeJob("test", ConnectionsMetricsEndpointScrapeJobArgs.builder()
                .stackId("1")
                .name("my-scrape-job")
                .enabled(true)
                .authenticationMethod("basic")
                .authenticationBasicUsername("my-username")
                .authenticationBasicPassword("my-password")
                .url("https://grafana.com/metrics")
                .scrapeIntervalSeconds(120)
                .build());
    
        }
    }
    
    resources:
      test:
        type: grafana:ConnectionsMetricsEndpointScrapeJob
        properties:
          stackId: '1'
          name: my-scrape-job
          enabled: true
          authenticationMethod: basic
          authenticationBasicUsername: my-username
          authenticationBasicPassword: my-password
          url: https://grafana.com/metrics
          scrapeIntervalSeconds: 120
    

    Create ConnectionsMetricsEndpointScrapeJob Resource

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

    Constructor syntax

    new ConnectionsMetricsEndpointScrapeJob(name: string, args: ConnectionsMetricsEndpointScrapeJobArgs, opts?: CustomResourceOptions);
    @overload
    def ConnectionsMetricsEndpointScrapeJob(resource_name: str,
                                            args: ConnectionsMetricsEndpointScrapeJobArgs,
                                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def ConnectionsMetricsEndpointScrapeJob(resource_name: str,
                                            opts: Optional[ResourceOptions] = None,
                                            authentication_method: Optional[str] = None,
                                            stack_id: Optional[str] = None,
                                            url: Optional[str] = None,
                                            authentication_basic_password: Optional[str] = None,
                                            authentication_basic_username: Optional[str] = None,
                                            authentication_bearer_token: Optional[str] = None,
                                            enabled: Optional[bool] = None,
                                            name: Optional[str] = None,
                                            scrape_interval_seconds: Optional[int] = None)
    func NewConnectionsMetricsEndpointScrapeJob(ctx *Context, name string, args ConnectionsMetricsEndpointScrapeJobArgs, opts ...ResourceOption) (*ConnectionsMetricsEndpointScrapeJob, error)
    public ConnectionsMetricsEndpointScrapeJob(string name, ConnectionsMetricsEndpointScrapeJobArgs args, CustomResourceOptions? opts = null)
    public ConnectionsMetricsEndpointScrapeJob(String name, ConnectionsMetricsEndpointScrapeJobArgs args)
    public ConnectionsMetricsEndpointScrapeJob(String name, ConnectionsMetricsEndpointScrapeJobArgs args, CustomResourceOptions options)
    
    type: grafana:ConnectionsMetricsEndpointScrapeJob
    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 ConnectionsMetricsEndpointScrapeJobArgs
    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 ConnectionsMetricsEndpointScrapeJobArgs
    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 ConnectionsMetricsEndpointScrapeJobArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ConnectionsMetricsEndpointScrapeJobArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ConnectionsMetricsEndpointScrapeJobArgs
    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 connectionsMetricsEndpointScrapeJobResource = new Grafana.ConnectionsMetricsEndpointScrapeJob("connectionsMetricsEndpointScrapeJobResource", new()
    {
        AuthenticationMethod = "string",
        StackId = "string",
        Url = "string",
        AuthenticationBasicPassword = "string",
        AuthenticationBasicUsername = "string",
        AuthenticationBearerToken = "string",
        Enabled = false,
        Name = "string",
        ScrapeIntervalSeconds = 0,
    });
    
    example, err := grafana.NewConnectionsMetricsEndpointScrapeJob(ctx, "connectionsMetricsEndpointScrapeJobResource", &grafana.ConnectionsMetricsEndpointScrapeJobArgs{
    	AuthenticationMethod:        pulumi.String("string"),
    	StackId:                     pulumi.String("string"),
    	Url:                         pulumi.String("string"),
    	AuthenticationBasicPassword: pulumi.String("string"),
    	AuthenticationBasicUsername: pulumi.String("string"),
    	AuthenticationBearerToken:   pulumi.String("string"),
    	Enabled:                     pulumi.Bool(false),
    	Name:                        pulumi.String("string"),
    	ScrapeIntervalSeconds:       pulumi.Int(0),
    })
    
    var connectionsMetricsEndpointScrapeJobResource = new ConnectionsMetricsEndpointScrapeJob("connectionsMetricsEndpointScrapeJobResource", ConnectionsMetricsEndpointScrapeJobArgs.builder()
        .authenticationMethod("string")
        .stackId("string")
        .url("string")
        .authenticationBasicPassword("string")
        .authenticationBasicUsername("string")
        .authenticationBearerToken("string")
        .enabled(false)
        .name("string")
        .scrapeIntervalSeconds(0)
        .build());
    
    connections_metrics_endpoint_scrape_job_resource = grafana.ConnectionsMetricsEndpointScrapeJob("connectionsMetricsEndpointScrapeJobResource",
        authentication_method="string",
        stack_id="string",
        url="string",
        authentication_basic_password="string",
        authentication_basic_username="string",
        authentication_bearer_token="string",
        enabled=False,
        name="string",
        scrape_interval_seconds=0)
    
    const connectionsMetricsEndpointScrapeJobResource = new grafana.ConnectionsMetricsEndpointScrapeJob("connectionsMetricsEndpointScrapeJobResource", {
        authenticationMethod: "string",
        stackId: "string",
        url: "string",
        authenticationBasicPassword: "string",
        authenticationBasicUsername: "string",
        authenticationBearerToken: "string",
        enabled: false,
        name: "string",
        scrapeIntervalSeconds: 0,
    });
    
    type: grafana:ConnectionsMetricsEndpointScrapeJob
    properties:
        authenticationBasicPassword: string
        authenticationBasicUsername: string
        authenticationBearerToken: string
        authenticationMethod: string
        enabled: false
        name: string
        scrapeIntervalSeconds: 0
        stackId: string
        url: string
    

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

    AuthenticationMethod string
    Method to pass authentication credentials: basic or bearer.
    StackId string
    Url string
    The url to scrape metrics from; a valid HTTPs URL is required.
    AuthenticationBasicPassword string
    Password for basic authentication, use if scrape job is using basic authentication method
    AuthenticationBasicUsername string
    Username for basic authentication, use if scrape job is using basic authentication method
    AuthenticationBearerToken string
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    Enabled bool
    Whether the metrics endpoint scrape job is enabled or not.
    Name string
    ScrapeIntervalSeconds int
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
    AuthenticationMethod string
    Method to pass authentication credentials: basic or bearer.
    StackId string
    Url string
    The url to scrape metrics from; a valid HTTPs URL is required.
    AuthenticationBasicPassword string
    Password for basic authentication, use if scrape job is using basic authentication method
    AuthenticationBasicUsername string
    Username for basic authentication, use if scrape job is using basic authentication method
    AuthenticationBearerToken string
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    Enabled bool
    Whether the metrics endpoint scrape job is enabled or not.
    Name string
    ScrapeIntervalSeconds int
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
    authenticationMethod String
    Method to pass authentication credentials: basic or bearer.
    stackId String
    url String
    The url to scrape metrics from; a valid HTTPs URL is required.
    authenticationBasicPassword String
    Password for basic authentication, use if scrape job is using basic authentication method
    authenticationBasicUsername String
    Username for basic authentication, use if scrape job is using basic authentication method
    authenticationBearerToken String
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    enabled Boolean
    Whether the metrics endpoint scrape job is enabled or not.
    name String
    scrapeIntervalSeconds Integer
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
    authenticationMethod string
    Method to pass authentication credentials: basic or bearer.
    stackId string
    url string
    The url to scrape metrics from; a valid HTTPs URL is required.
    authenticationBasicPassword string
    Password for basic authentication, use if scrape job is using basic authentication method
    authenticationBasicUsername string
    Username for basic authentication, use if scrape job is using basic authentication method
    authenticationBearerToken string
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    enabled boolean
    Whether the metrics endpoint scrape job is enabled or not.
    name string
    scrapeIntervalSeconds number
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
    authentication_method str
    Method to pass authentication credentials: basic or bearer.
    stack_id str
    url str
    The url to scrape metrics from; a valid HTTPs URL is required.
    authentication_basic_password str
    Password for basic authentication, use if scrape job is using basic authentication method
    authentication_basic_username str
    Username for basic authentication, use if scrape job is using basic authentication method
    authentication_bearer_token str
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    enabled bool
    Whether the metrics endpoint scrape job is enabled or not.
    name str
    scrape_interval_seconds int
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
    authenticationMethod String
    Method to pass authentication credentials: basic or bearer.
    stackId String
    url String
    The url to scrape metrics from; a valid HTTPs URL is required.
    authenticationBasicPassword String
    Password for basic authentication, use if scrape job is using basic authentication method
    authenticationBasicUsername String
    Username for basic authentication, use if scrape job is using basic authentication method
    authenticationBearerToken String
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    enabled Boolean
    Whether the metrics endpoint scrape job is enabled or not.
    name String
    scrapeIntervalSeconds Number
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ConnectionsMetricsEndpointScrapeJob Resource

    Get an existing ConnectionsMetricsEndpointScrapeJob 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?: ConnectionsMetricsEndpointScrapeJobState, opts?: CustomResourceOptions): ConnectionsMetricsEndpointScrapeJob
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            authentication_basic_password: Optional[str] = None,
            authentication_basic_username: Optional[str] = None,
            authentication_bearer_token: Optional[str] = None,
            authentication_method: Optional[str] = None,
            enabled: Optional[bool] = None,
            name: Optional[str] = None,
            scrape_interval_seconds: Optional[int] = None,
            stack_id: Optional[str] = None,
            url: Optional[str] = None) -> ConnectionsMetricsEndpointScrapeJob
    func GetConnectionsMetricsEndpointScrapeJob(ctx *Context, name string, id IDInput, state *ConnectionsMetricsEndpointScrapeJobState, opts ...ResourceOption) (*ConnectionsMetricsEndpointScrapeJob, error)
    public static ConnectionsMetricsEndpointScrapeJob Get(string name, Input<string> id, ConnectionsMetricsEndpointScrapeJobState? state, CustomResourceOptions? opts = null)
    public static ConnectionsMetricsEndpointScrapeJob get(String name, Output<String> id, ConnectionsMetricsEndpointScrapeJobState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    AuthenticationBasicPassword string
    Password for basic authentication, use if scrape job is using basic authentication method
    AuthenticationBasicUsername string
    Username for basic authentication, use if scrape job is using basic authentication method
    AuthenticationBearerToken string
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    AuthenticationMethod string
    Method to pass authentication credentials: basic or bearer.
    Enabled bool
    Whether the metrics endpoint scrape job is enabled or not.
    Name string
    ScrapeIntervalSeconds int
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
    StackId string
    Url string
    The url to scrape metrics from; a valid HTTPs URL is required.
    AuthenticationBasicPassword string
    Password for basic authentication, use if scrape job is using basic authentication method
    AuthenticationBasicUsername string
    Username for basic authentication, use if scrape job is using basic authentication method
    AuthenticationBearerToken string
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    AuthenticationMethod string
    Method to pass authentication credentials: basic or bearer.
    Enabled bool
    Whether the metrics endpoint scrape job is enabled or not.
    Name string
    ScrapeIntervalSeconds int
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
    StackId string
    Url string
    The url to scrape metrics from; a valid HTTPs URL is required.
    authenticationBasicPassword String
    Password for basic authentication, use if scrape job is using basic authentication method
    authenticationBasicUsername String
    Username for basic authentication, use if scrape job is using basic authentication method
    authenticationBearerToken String
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    authenticationMethod String
    Method to pass authentication credentials: basic or bearer.
    enabled Boolean
    Whether the metrics endpoint scrape job is enabled or not.
    name String
    scrapeIntervalSeconds Integer
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
    stackId String
    url String
    The url to scrape metrics from; a valid HTTPs URL is required.
    authenticationBasicPassword string
    Password for basic authentication, use if scrape job is using basic authentication method
    authenticationBasicUsername string
    Username for basic authentication, use if scrape job is using basic authentication method
    authenticationBearerToken string
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    authenticationMethod string
    Method to pass authentication credentials: basic or bearer.
    enabled boolean
    Whether the metrics endpoint scrape job is enabled or not.
    name string
    scrapeIntervalSeconds number
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
    stackId string
    url string
    The url to scrape metrics from; a valid HTTPs URL is required.
    authentication_basic_password str
    Password for basic authentication, use if scrape job is using basic authentication method
    authentication_basic_username str
    Username for basic authentication, use if scrape job is using basic authentication method
    authentication_bearer_token str
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    authentication_method str
    Method to pass authentication credentials: basic or bearer.
    enabled bool
    Whether the metrics endpoint scrape job is enabled or not.
    name str
    scrape_interval_seconds int
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
    stack_id str
    url str
    The url to scrape metrics from; a valid HTTPs URL is required.
    authenticationBasicPassword String
    Password for basic authentication, use if scrape job is using basic authentication method
    authenticationBasicUsername String
    Username for basic authentication, use if scrape job is using basic authentication method
    authenticationBearerToken String
    Bearer token used for authentication, use if scrape job is using bearer authentication method
    authenticationMethod String
    Method to pass authentication credentials: basic or bearer.
    enabled Boolean
    Whether the metrics endpoint scrape job is enabled or not.
    name String
    scrapeIntervalSeconds Number
    Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
    stackId String
    url String
    The url to scrape metrics from; a valid HTTPs URL is required.

    Import

    $ pulumi import grafana:index/connectionsMetricsEndpointScrapeJob:ConnectionsMetricsEndpointScrapeJob 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.7.1 published on Monday, Nov 25, 2024 by pulumiverse