GitLab

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

getClusterAgents

The gitlab.getClusterAgents data source allows details of GitLab Agents for Kubernetes in a project.

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 agents = Output.Create(GitLab.GetClusterAgents.InvokeAsync(new GitLab.GetClusterAgentsArgs
        {
            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.GetClusterAgents(ctx, &GetClusterAgentsArgs{
			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 agents = Output.of(GitlabFunctions.getClusterAgents(GetClusterAgentsArgs.builder()
            .project("12345")
            .build()));

    }
}
import pulumi
import pulumi_gitlab as gitlab

agents = gitlab.get_cluster_agents(project="12345")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const agents = pulumi.output(gitlab.getClusterAgents({
    project: "12345",
}));
variables:
  agents:
    Fn::Invoke:
      Function: gitlab:getClusterAgents
      Arguments:
        project: 12345

Using getClusterAgents

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 getClusterAgents(args: GetClusterAgentsArgs, opts?: InvokeOptions): Promise<GetClusterAgentsResult>
function getClusterAgentsOutput(args: GetClusterAgentsOutputArgs, opts?: InvokeOptions): Output<GetClusterAgentsResult>
def get_cluster_agents(project: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetClusterAgentsResult
def get_cluster_agents_output(project: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetClusterAgentsResult]
func GetClusterAgents(ctx *Context, args *GetClusterAgentsArgs, opts ...InvokeOption) (*GetClusterAgentsResult, error)
func GetClusterAgentsOutput(ctx *Context, args *GetClusterAgentsOutputArgs, opts ...InvokeOption) GetClusterAgentsResultOutput

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

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

The following arguments are supported:

Project string
Project string
project String
project string
project String

getClusterAgents Result

The following output properties are available:

ClusterAgents List<Pulumi.GitLab.Outputs.GetClusterAgentsClusterAgent>
Id string

The provider-assigned unique ID for this managed resource.

Project string
ClusterAgents []GetClusterAgentsClusterAgent
Id string

The provider-assigned unique ID for this managed resource.

Project string
clusterAgents List<GetClusterAgentsClusterAgent>
id String

The provider-assigned unique ID for this managed resource.

project String
clusterAgents GetClusterAgentsClusterAgent[]
id string

The provider-assigned unique ID for this managed resource.

project string
cluster_agents Sequence[GetClusterAgentsClusterAgent]
id str

The provider-assigned unique ID for this managed resource.

project str
clusterAgents List<Property Map>
id String

The provider-assigned unique ID for this managed resource.

project String

Supporting Types

GetClusterAgentsClusterAgent

AgentId int
CreatedAt string
CreatedByUserId int
Name string
Project string
AgentId int
CreatedAt string
CreatedByUserId int
Name string
Project string
agentId Integer
createdAt String
createdByUserId Integer
name String
project String
agentId number
createdAt string
createdByUserId number
name string
project string
agentId Number
createdAt String
createdByUserId Number
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.