GitLab

v4.8.0 published on Friday, Jul 15, 2022 by Pulumi

getClusterAgent

The gitlab.ClusterAgent data source allows to retrieve details about a GitLab Agent for Kubernetes.

Requires at least GitLab 14.10

Upstream API: GitLab REST API docs

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(GitLab.GetClusterAgent.InvokeAsync(new GitLab.GetClusterAgentArgs
        {
            AgentId = 1,
            Project = "12345",
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v4/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := gitlab.LookupClusterAgent(ctx, &GetClusterAgentArgs{
			AgentId: 1,
			Project: "12345",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = Output.of(GitlabFunctions.getClusterAgent(GetClusterAgentArgs.builder()
            .agentId(1)
            .project("12345")
            .build()));

    }
}
import pulumi
import pulumi_gitlab as gitlab

example = gitlab.get_cluster_agent(agent_id=1,
    project="12345")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const example = pulumi.output(gitlab.getClusterAgent({
    agentId: 1,
    project: "12345",
}));
variables:
  example:
    Fn::Invoke:
      Function: gitlab:getClusterAgent
      Arguments:
        agentId: 1
        project: 12345

Using getClusterAgent

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 getClusterAgent(args: GetClusterAgentArgs, opts?: InvokeOptions): Promise<GetClusterAgentResult>
function getClusterAgentOutput(args: GetClusterAgentOutputArgs, opts?: InvokeOptions): Output<GetClusterAgentResult>
def get_cluster_agent(agent_id: Optional[int] = None,
                      project: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetClusterAgentResult
def get_cluster_agent_output(agent_id: Optional[pulumi.Input[int]] = None,
                      project: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetClusterAgentResult]
func LookupClusterAgent(ctx *Context, args *LookupClusterAgentArgs, opts ...InvokeOption) (*LookupClusterAgentResult, error)
func LookupClusterAgentOutput(ctx *Context, args *LookupClusterAgentOutputArgs, opts ...InvokeOption) LookupClusterAgentResultOutput

> Note: This function is named LookupClusterAgent in the Go SDK.

public static class GetClusterAgent 
{
    public static Task<GetClusterAgentResult> InvokeAsync(GetClusterAgentArgs args, InvokeOptions? opts = null)
    public static Output<GetClusterAgentResult> Invoke(GetClusterAgentInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetClusterAgentResult> getClusterAgent(GetClusterAgentArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
Fn::Invoke:
  Function: gitlab:index/getClusterAgent:getClusterAgent
  Arguments:
    # Arguments dictionary

The following arguments are supported:

AgentId int
Project string
AgentId int
Project string
agentId Integer
project String
agentId number
project string
agentId Number
project String

getClusterAgent Result

The following output properties are available:

AgentId int
CreatedAt string
CreatedByUserId int
Id string

The provider-assigned unique ID for this managed resource.

Name string
Project string
AgentId int
CreatedAt string
CreatedByUserId int
Id string

The provider-assigned unique ID for this managed resource.

Name string
Project string
agentId Integer
createdAt String
createdByUserId Integer
id String

The provider-assigned unique ID for this managed resource.

name String
project String
agentId number
createdAt string
createdByUserId number
id string

The provider-assigned unique ID for this managed resource.

name string
project string
agent_id int
created_at str
created_by_user_id int
id str

The provider-assigned unique ID for this managed resource.

name str
project str
agentId Number
createdAt String
createdByUserId Number
id String

The provider-assigned unique ID for this managed resource.

name String
project String

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes

This Pulumi package is based on the gitlab Terraform Provider.