Grafana v0.16.1 published on Saturday, Mar 15, 2025 by pulumiverse
grafana.connections.getMetricsEndpointScrapeJob
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as grafana from "@pulumi/grafana";
const dsTest = grafana.connections.getMetricsEndpointScrapeJob({
    stackId: "1",
    name: "my-scrape-job",
});
import pulumi
import pulumi_grafana as grafana
ds_test = grafana.connections.get_metrics_endpoint_scrape_job(stack_id="1",
    name="my-scrape-job")
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.LookupMetricsEndpointScrapeJob(ctx, &connections.LookupMetricsEndpointScrapeJobArgs{
			StackId: "1",
			Name:    "my-scrape-job",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Grafana = Pulumi.Grafana;
return await Deployment.RunAsync(() => 
{
    var dsTest = Grafana.Connections.GetMetricsEndpointScrapeJob.Invoke(new()
    {
        StackId = "1",
        Name = "my-scrape-job",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.grafana.connections.ConnectionsFunctions;
import com.pulumi.grafana.connections.inputs.GetMetricsEndpointScrapeJobArgs;
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 dsTest = ConnectionsFunctions.getMetricsEndpointScrapeJob(GetMetricsEndpointScrapeJobArgs.builder()
            .stackId("1")
            .name("my-scrape-job")
            .build());
    }
}
variables:
  dsTest:
    fn::invoke:
      function: grafana:connections:getMetricsEndpointScrapeJob
      arguments:
        stackId: '1'
        name: my-scrape-job
Using getMetricsEndpointScrapeJob
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getMetricsEndpointScrapeJob(args: GetMetricsEndpointScrapeJobArgs, opts?: InvokeOptions): Promise<GetMetricsEndpointScrapeJobResult>
function getMetricsEndpointScrapeJobOutput(args: GetMetricsEndpointScrapeJobOutputArgs, opts?: InvokeOptions): Output<GetMetricsEndpointScrapeJobResult>def get_metrics_endpoint_scrape_job(name: Optional[str] = None,
                                    stack_id: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetMetricsEndpointScrapeJobResult
def get_metrics_endpoint_scrape_job_output(name: Optional[pulumi.Input[str]] = None,
                                    stack_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetMetricsEndpointScrapeJobResult]func LookupMetricsEndpointScrapeJob(ctx *Context, args *LookupMetricsEndpointScrapeJobArgs, opts ...InvokeOption) (*LookupMetricsEndpointScrapeJobResult, error)
func LookupMetricsEndpointScrapeJobOutput(ctx *Context, args *LookupMetricsEndpointScrapeJobOutputArgs, opts ...InvokeOption) LookupMetricsEndpointScrapeJobResultOutput> Note: This function is named LookupMetricsEndpointScrapeJob in the Go SDK.
public static class GetMetricsEndpointScrapeJob 
{
    public static Task<GetMetricsEndpointScrapeJobResult> InvokeAsync(GetMetricsEndpointScrapeJobArgs args, InvokeOptions? opts = null)
    public static Output<GetMetricsEndpointScrapeJobResult> Invoke(GetMetricsEndpointScrapeJobInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetMetricsEndpointScrapeJobResult> getMetricsEndpointScrapeJob(GetMetricsEndpointScrapeJobArgs args, InvokeOptions options)
public static Output<GetMetricsEndpointScrapeJobResult> getMetricsEndpointScrapeJob(GetMetricsEndpointScrapeJobArgs args, InvokeOptions options)
fn::invoke:
  function: grafana:connections/getMetricsEndpointScrapeJob:getMetricsEndpointScrapeJob
  arguments:
    # arguments dictionaryThe following arguments are supported:
getMetricsEndpointScrapeJob Result
The following output properties are available:
- AuthenticationBasic stringPassword 
- Password for basic authentication.
- AuthenticationBasic stringUsername 
- Username for basic authentication.
- AuthenticationBearer stringToken 
- Token for authentication bearer.
- AuthenticationMethod string
- Method to pass authentication credentials: basic or bearer.
- Enabled bool
- Whether the metrics endpoint scrape job is enabled or not.
- Id string
- Name string
- ScrapeInterval intSeconds 
- Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- StackId string
- Url string
- The url to scrape metrics.
- AuthenticationBasic stringPassword 
- Password for basic authentication.
- AuthenticationBasic stringUsername 
- Username for basic authentication.
- AuthenticationBearer stringToken 
- Token for authentication bearer.
- AuthenticationMethod string
- Method to pass authentication credentials: basic or bearer.
- Enabled bool
- Whether the metrics endpoint scrape job is enabled or not.
- Id string
- Name string
- ScrapeInterval intSeconds 
- Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- StackId string
- Url string
- The url to scrape metrics.
- authenticationBasic StringPassword 
- Password for basic authentication.
- authenticationBasic StringUsername 
- Username for basic authentication.
- authenticationBearer StringToken 
- Token for authentication bearer.
- authenticationMethod String
- Method to pass authentication credentials: basic or bearer.
- enabled Boolean
- Whether the metrics endpoint scrape job is enabled or not.
- id String
- name String
- scrapeInterval IntegerSeconds 
- Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- stackId String
- url String
- The url to scrape metrics.
- authenticationBasic stringPassword 
- Password for basic authentication.
- authenticationBasic stringUsername 
- Username for basic authentication.
- authenticationBearer stringToken 
- Token for authentication bearer.
- authenticationMethod string
- Method to pass authentication credentials: basic or bearer.
- enabled boolean
- Whether the metrics endpoint scrape job is enabled or not.
- id string
- name string
- scrapeInterval numberSeconds 
- Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- stackId string
- url string
- The url to scrape metrics.
- authentication_basic_ strpassword 
- Password for basic authentication.
- authentication_basic_ strusername 
- Username for basic authentication.
- authentication_bearer_ strtoken 
- Token for authentication bearer.
- authentication_method str
- Method to pass authentication credentials: basic or bearer.
- enabled bool
- Whether the metrics endpoint scrape job is enabled or not.
- id str
- 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.
- authenticationBasic StringPassword 
- Password for basic authentication.
- authenticationBasic StringUsername 
- Username for basic authentication.
- authenticationBearer StringToken 
- Token for authentication bearer.
- authenticationMethod String
- Method to pass authentication credentials: basic or bearer.
- enabled Boolean
- Whether the metrics endpoint scrape job is enabled or not.
- id String
- name String
- scrapeInterval NumberSeconds 
- Frequency for scraping the metrics endpoint: 30, 60, or 120 seconds.
- stackId String
- url String
- The url to scrape metrics.
Package Details
- Repository
- grafana pulumiverse/pulumi-grafana
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the grafanaTerraform Provider.
