grafana.ConnectionsMetricsEndpointScrapeJob
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumiverse/grafana";
const test = new grafana.connections.MetricsEndpointScrapeJob("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.connections.MetricsEndpointScrapeJob("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/connections"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := connections.NewMetricsEndpointScrapeJob(ctx, "test", &connections.MetricsEndpointScrapeJobArgs{
			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.Connections.MetricsEndpointScrapeJob("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.connections.MetricsEndpointScrapeJob;
import com.pulumi.grafana.connections.MetricsEndpointScrapeJobArgs;
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 MetricsEndpointScrapeJob("test", MetricsEndpointScrapeJobArgs.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:connections:MetricsEndpointScrapeJob
    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_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)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.
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.
- AuthenticationBasic stringPassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- AuthenticationBasic stringUsername 
- Username for basic authentication, use if scrape job is using basic authentication method
- AuthenticationBearer stringToken 
- 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
- ScrapeInterval intSeconds 
- 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.
- AuthenticationBasic stringPassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- AuthenticationBasic stringUsername 
- Username for basic authentication, use if scrape job is using basic authentication method
- AuthenticationBearer stringToken 
- 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
- ScrapeInterval intSeconds 
- 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.
- authenticationBasic StringPassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- authenticationBasic StringUsername 
- Username for basic authentication, use if scrape job is using basic authentication method
- authenticationBearer StringToken 
- 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
- scrapeInterval IntegerSeconds 
- 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.
- authenticationBasic stringPassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- authenticationBasic stringUsername 
- Username for basic authentication, use if scrape job is using basic authentication method
- authenticationBearer stringToken 
- 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
- scrapeInterval numberSeconds 
- 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_ strpassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- authentication_basic_ strusername 
- Username for basic authentication, use if scrape job is using basic authentication method
- authentication_bearer_ strtoken 
- 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_ intseconds 
- 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.
- authenticationBasic StringPassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- authenticationBasic StringUsername 
- Username for basic authentication, use if scrape job is using basic authentication method
- authenticationBearer StringToken 
- 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
- scrapeInterval NumberSeconds 
- 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) -> ConnectionsMetricsEndpointScrapeJobfunc 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)resources:  _:    type: grafana:ConnectionsMetricsEndpointScrapeJob    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.
- AuthenticationBasic stringPassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- AuthenticationBasic stringUsername 
- Username for basic authentication, use if scrape job is using basic authentication method
- AuthenticationBearer stringToken 
- 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
- ScrapeInterval intSeconds 
- 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.
- AuthenticationBasic stringPassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- AuthenticationBasic stringUsername 
- Username for basic authentication, use if scrape job is using basic authentication method
- AuthenticationBearer stringToken 
- 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
- ScrapeInterval intSeconds 
- 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.
- authenticationBasic StringPassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- authenticationBasic StringUsername 
- Username for basic authentication, use if scrape job is using basic authentication method
- authenticationBearer StringToken 
- 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
- scrapeInterval IntegerSeconds 
- 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.
- authenticationBasic stringPassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- authenticationBasic stringUsername 
- Username for basic authentication, use if scrape job is using basic authentication method
- authenticationBearer stringToken 
- 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
- scrapeInterval numberSeconds 
- 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_ strpassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- authentication_basic_ strusername 
- Username for basic authentication, use if scrape job is using basic authentication method
- authentication_bearer_ strtoken 
- 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_ intseconds 
- 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.
- authenticationBasic StringPassword 
- Password for basic authentication, use if scrape job is using basic authentication method
- authenticationBasic StringUsername 
- Username for basic authentication, use if scrape job is using basic authentication method
- authenticationBearer StringToken 
- 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
- scrapeInterval NumberSeconds 
- 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 grafanaTerraform Provider.
