grafana.ConnectionsMetricsEndpointScrapeJob
Explore with Pulumi AI
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:
- Authentication
Method string - Method to pass authentication credentials: basic or bearer.
- Stack
Id string - Url string
- The url to scrape metrics from; a valid HTTPs URL is required.
- Authentication
Basic stringPassword - Password for basic authentication, use if scrape job is using basic authentication method
- Authentication
Basic stringUsername - Username for basic authentication, use if scrape job is using basic authentication method
- Authentication
Bearer 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
- Scrape
Interval intSeconds - Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- Authentication
Method string - Method to pass authentication credentials: basic or bearer.
- Stack
Id string - Url string
- The url to scrape metrics from; a valid HTTPs URL is required.
- Authentication
Basic stringPassword - Password for basic authentication, use if scrape job is using basic authentication method
- Authentication
Basic stringUsername - Username for basic authentication, use if scrape job is using basic authentication method
- Authentication
Bearer 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
- Scrape
Interval intSeconds - Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- authentication
Method String - Method to pass authentication credentials: basic or bearer.
- stack
Id String - url String
- The url to scrape metrics from; a valid HTTPs URL is required.
- authentication
Basic StringPassword - Password for basic authentication, use if scrape job is using basic authentication method
- authentication
Basic StringUsername - Username for basic authentication, use if scrape job is using basic authentication method
- authentication
Bearer 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
- scrape
Interval IntegerSeconds - Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- authentication
Method string - Method to pass authentication credentials: basic or bearer.
- stack
Id string - url string
- The url to scrape metrics from; a valid HTTPs URL is required.
- authentication
Basic stringPassword - Password for basic authentication, use if scrape job is using basic authentication method
- authentication
Basic stringUsername - Username for basic authentication, use if scrape job is using basic authentication method
- authentication
Bearer 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
- scrape
Interval 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.
- authentication
Method String - Method to pass authentication credentials: basic or bearer.
- stack
Id String - url String
- The url to scrape metrics from; a valid HTTPs URL is required.
- authentication
Basic StringPassword - Password for basic authentication, use if scrape job is using basic authentication method
- authentication
Basic StringUsername - Username for basic authentication, use if scrape job is using basic authentication method
- authentication
Bearer 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
- scrape
Interval 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) -> 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.
- Authentication
Basic stringPassword - Password for basic authentication, use if scrape job is using basic authentication method
- Authentication
Basic stringUsername - Username for basic authentication, use if scrape job is using basic authentication method
- Authentication
Bearer stringToken - Bearer token used for authentication, use if scrape job is using bearer authentication method
- Authentication
Method string - Method to pass authentication credentials: basic or bearer.
- Enabled bool
- Whether the metrics endpoint scrape job is enabled or not.
- Name string
- Scrape
Interval intSeconds - Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- Stack
Id string - Url string
- The url to scrape metrics from; a valid HTTPs URL is required.
- Authentication
Basic stringPassword - Password for basic authentication, use if scrape job is using basic authentication method
- Authentication
Basic stringUsername - Username for basic authentication, use if scrape job is using basic authentication method
- Authentication
Bearer stringToken - Bearer token used for authentication, use if scrape job is using bearer authentication method
- Authentication
Method string - Method to pass authentication credentials: basic or bearer.
- Enabled bool
- Whether the metrics endpoint scrape job is enabled or not.
- Name string
- Scrape
Interval intSeconds - Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- Stack
Id string - Url string
- The url to scrape metrics from; a valid HTTPs URL is required.
- authentication
Basic StringPassword - Password for basic authentication, use if scrape job is using basic authentication method
- authentication
Basic StringUsername - Username for basic authentication, use if scrape job is using basic authentication method
- authentication
Bearer StringToken - Bearer token used for authentication, use if scrape job is using bearer authentication method
- authentication
Method String - Method to pass authentication credentials: basic or bearer.
- enabled Boolean
- Whether the metrics endpoint scrape job is enabled or not.
- name String
- scrape
Interval IntegerSeconds - Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- stack
Id String - url String
- The url to scrape metrics from; a valid HTTPs URL is required.
- authentication
Basic stringPassword - Password for basic authentication, use if scrape job is using basic authentication method
- authentication
Basic stringUsername - Username for basic authentication, use if scrape job is using basic authentication method
- authentication
Bearer stringToken - Bearer token used for authentication, use if scrape job is using bearer authentication method
- authentication
Method string - Method to pass authentication credentials: basic or bearer.
- enabled boolean
- Whether the metrics endpoint scrape job is enabled or not.
- name string
- scrape
Interval numberSeconds - Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- stack
Id 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.
- authentication
Basic StringPassword - Password for basic authentication, use if scrape job is using basic authentication method
- authentication
Basic StringUsername - Username for basic authentication, use if scrape job is using basic authentication method
- authentication
Bearer StringToken - Bearer token used for authentication, use if scrape job is using bearer authentication method
- authentication
Method String - Method to pass authentication credentials: basic or bearer.
- enabled Boolean
- Whether the metrics endpoint scrape job is enabled or not.
- name String
- scrape
Interval NumberSeconds - Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- stack
Id 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.