1. Packages
  2. Rancher2
  3. API Docs
  4. getCloudCredential
Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi

rancher2.getCloudCredential

Explore with Pulumi AI

rancher2 logo
Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as rancher2 from "@pulumi/rancher2";
    
    const test = rancher2.getCloudCredential({
        name: "test",
    });
    
    import pulumi
    import pulumi_rancher2 as rancher2
    
    test = rancher2.get_cloud_credential(name="test")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-rancher2/sdk/v6/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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Rancher2 = Pulumi.Rancher2;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Rancher2.GetCloudCredential.Invoke(new()
        {
            Name = "test",
        });
    
    });
    
    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());
    
        }
    }
    
    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.
    rancher2 logo
    Rancher 2 v6.1.0 published on Tuesday, Mar 12, 2024 by Pulumi