rancher2 logo
Rancher 2 v3.9.0, Jan 18 23

rancher2.getCloudCredential

Use this data source to retrieve information about a Rancher v2 Cloud Credential.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Rancher2 = Pulumi.Rancher2;

return await Deployment.RunAsync(() => 
{
    var test = Rancher2.GetCloudCredential.Invoke(new()
    {
        Name = "test",
    });

});
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := rancher2.LookupCloudCredential(ctx, &rancher2.LookupCloudCredentialArgs{
			Name: "test",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.rancher2.Rancher2Functions;
import com.pulumi.rancher2.inputs.GetCloudCredentialArgs;
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 test = Rancher2Functions.getCloudCredential(GetCloudCredentialArgs.builder()
            .name("test")
            .build());

    }
}
import pulumi
import pulumi_rancher2 as rancher2

test = rancher2.get_cloud_credential(name="test")
import * as pulumi from "@pulumi/pulumi";
import * as rancher2 from "@pulumi/rancher2";

const test = rancher2.getCloudCredential({
    name: "test",
});
variables:
  test:
    fn::invoke:
      Function: rancher2:getCloudCredential
      Arguments:
        name: test

Using getCloudCredential

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 getCloudCredential(args: GetCloudCredentialArgs, opts?: InvokeOptions): Promise<GetCloudCredentialResult>
function getCloudCredentialOutput(args: GetCloudCredentialOutputArgs, opts?: InvokeOptions): Output<GetCloudCredentialResult>
def get_cloud_credential(name: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetCloudCredentialResult
def get_cloud_credential_output(name: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetCloudCredentialResult]
func LookupCloudCredential(ctx *Context, args *LookupCloudCredentialArgs, opts ...InvokeOption) (*LookupCloudCredentialResult, error)
func LookupCloudCredentialOutput(ctx *Context, args *LookupCloudCredentialOutputArgs, opts ...InvokeOption) LookupCloudCredentialResultOutput

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

public static class GetCloudCredential 
{
    public static Task<GetCloudCredentialResult> InvokeAsync(GetCloudCredentialArgs args, InvokeOptions? opts = null)
    public static Output<GetCloudCredentialResult> Invoke(GetCloudCredentialInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCloudCredentialResult> getCloudCredential(GetCloudCredentialArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: rancher2:index/getCloudCredential:getCloudCredential
  arguments:
    # arguments dictionary

The following arguments are supported:

Name string

The Cloud Credential name.

Name string

The Cloud Credential name.

name String

The Cloud Credential name.

name string

The Cloud Credential name.

name str

The Cloud Credential name.

name String

The Cloud Credential name.

getCloudCredential Result

The following output properties are available:

Annotations Dictionary<string, object>

(Computed) Annotations for the Cloud Credential (map)

Id string

The provider-assigned unique ID for this managed resource.

Labels Dictionary<string, object>

(Computed) Labels for the Cloud Credential (map)

Name string
Annotations map[string]interface{}

(Computed) Annotations for the Cloud Credential (map)

Id string

The provider-assigned unique ID for this managed resource.

Labels map[string]interface{}

(Computed) Labels for the Cloud Credential (map)

Name string
annotations Map<String,Object>

(Computed) Annotations for the Cloud Credential (map)

id String

The provider-assigned unique ID for this managed resource.

labels Map<String,Object>

(Computed) Labels for the Cloud Credential (map)

name String
annotations {[key: string]: any}

(Computed) Annotations for the Cloud Credential (map)

id string

The provider-assigned unique ID for this managed resource.

labels {[key: string]: any}

(Computed) Labels for the Cloud Credential (map)

name string
annotations Mapping[str, Any]

(Computed) Annotations for the Cloud Credential (map)

id str

The provider-assigned unique ID for this managed resource.

labels Mapping[str, Any]

(Computed) Labels for the Cloud Credential (map)

name str
annotations Map<Any>

(Computed) Annotations for the Cloud Credential (map)

id String

The provider-assigned unique ID for this managed resource.

labels Map<Any>

(Computed) Labels for the Cloud Credential (map)

name String

Package Details

Repository
Rancher2 pulumi/pulumi-rancher2
License
Apache-2.0
Notes

This Pulumi package is based on the rancher2 Terraform Provider.