1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. cs
  5. getClusterCredential
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.cs.getClusterCredential

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides Container Service cluster credential on Alibaba Cloud.

NOTE: Available since v1.187.0

NOTE: This datasource can be used on all kinds of ACK clusters, including managed clusters, imported kubernetes clusters, serverless clusters and edge clusters. Please make sure that the target cluster is not in the failed state before using this datasource, since the api server of clusters in the failed state cannot be accessed.

Using getClusterCredential

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 getClusterCredential(args: GetClusterCredentialArgs, opts?: InvokeOptions): Promise<GetClusterCredentialResult>
function getClusterCredentialOutput(args: GetClusterCredentialOutputArgs, opts?: InvokeOptions): Output<GetClusterCredentialResult>
Copy
def get_cluster_credential(cluster_id: Optional[str] = None,
                           output_file: Optional[str] = None,
                           temporary_duration_minutes: Optional[int] = None,
                           opts: Optional[InvokeOptions] = None) -> GetClusterCredentialResult
def get_cluster_credential_output(cluster_id: Optional[pulumi.Input[str]] = None,
                           output_file: Optional[pulumi.Input[str]] = None,
                           temporary_duration_minutes: Optional[pulumi.Input[int]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetClusterCredentialResult]
Copy
func GetClusterCredential(ctx *Context, args *GetClusterCredentialArgs, opts ...InvokeOption) (*GetClusterCredentialResult, error)
func GetClusterCredentialOutput(ctx *Context, args *GetClusterCredentialOutputArgs, opts ...InvokeOption) GetClusterCredentialResultOutput
Copy

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

public static class GetClusterCredential 
{
    public static Task<GetClusterCredentialResult> InvokeAsync(GetClusterCredentialArgs args, InvokeOptions? opts = null)
    public static Output<GetClusterCredentialResult> Invoke(GetClusterCredentialInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetClusterCredentialResult> getClusterCredential(GetClusterCredentialArgs args, InvokeOptions options)
public static Output<GetClusterCredentialResult> getClusterCredential(GetClusterCredentialArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cs/getClusterCredential:getClusterCredential
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ClusterId This property is required. string
The id of target cluster.
OutputFile string
File name where to save the returned KubeConfig (after running pulumi preview).
TemporaryDurationMinutes int
Automatic expiration time of the returned credential. The valid value between 15 and 4320, in minutes. When this field is omitted, the expiration time will be determined by the system automatically and the result will be in the attributed field expiration.
ClusterId This property is required. string
The id of target cluster.
OutputFile string
File name where to save the returned KubeConfig (after running pulumi preview).
TemporaryDurationMinutes int
Automatic expiration time of the returned credential. The valid value between 15 and 4320, in minutes. When this field is omitted, the expiration time will be determined by the system automatically and the result will be in the attributed field expiration.
clusterId This property is required. String
The id of target cluster.
outputFile String
File name where to save the returned KubeConfig (after running pulumi preview).
temporaryDurationMinutes Integer
Automatic expiration time of the returned credential. The valid value between 15 and 4320, in minutes. When this field is omitted, the expiration time will be determined by the system automatically and the result will be in the attributed field expiration.
clusterId This property is required. string
The id of target cluster.
outputFile string
File name where to save the returned KubeConfig (after running pulumi preview).
temporaryDurationMinutes number
Automatic expiration time of the returned credential. The valid value between 15 and 4320, in minutes. When this field is omitted, the expiration time will be determined by the system automatically and the result will be in the attributed field expiration.
cluster_id This property is required. str
The id of target cluster.
output_file str
File name where to save the returned KubeConfig (after running pulumi preview).
temporary_duration_minutes int
Automatic expiration time of the returned credential. The valid value between 15 and 4320, in minutes. When this field is omitted, the expiration time will be determined by the system automatically and the result will be in the attributed field expiration.
clusterId This property is required. String
The id of target cluster.
outputFile String
File name where to save the returned KubeConfig (after running pulumi preview).
temporaryDurationMinutes Number
Automatic expiration time of the returned credential. The valid value between 15 and 4320, in minutes. When this field is omitted, the expiration time will be determined by the system automatically and the result will be in the attributed field expiration.

getClusterCredential Result

The following output properties are available:

CertificateAuthority Pulumi.AliCloud.CS.Outputs.GetClusterCredentialCertificateAuthority
(Available in 1.105.0+) Nested attribute containing certificate authority data for your cluster.
ClusterId string
The id of target cluster.
ClusterName string
The name of target cluster.
Expiration string
Expiration time of kube config. Format: UTC time in rfc3339.
Id string
The provider-assigned unique ID for this managed resource.
KubeConfig string
(Sensitive) The kube config to use to authenticate with the cluster.
OutputFile string
TemporaryDurationMinutes int
CertificateAuthority GetClusterCredentialCertificateAuthority
(Available in 1.105.0+) Nested attribute containing certificate authority data for your cluster.
ClusterId string
The id of target cluster.
ClusterName string
The name of target cluster.
Expiration string
Expiration time of kube config. Format: UTC time in rfc3339.
Id string
The provider-assigned unique ID for this managed resource.
KubeConfig string
(Sensitive) The kube config to use to authenticate with the cluster.
OutputFile string
TemporaryDurationMinutes int
certificateAuthority GetClusterCredentialCertificateAuthority
(Available in 1.105.0+) Nested attribute containing certificate authority data for your cluster.
clusterId String
The id of target cluster.
clusterName String
The name of target cluster.
expiration String
Expiration time of kube config. Format: UTC time in rfc3339.
id String
The provider-assigned unique ID for this managed resource.
kubeConfig String
(Sensitive) The kube config to use to authenticate with the cluster.
outputFile String
temporaryDurationMinutes Integer
certificateAuthority GetClusterCredentialCertificateAuthority
(Available in 1.105.0+) Nested attribute containing certificate authority data for your cluster.
clusterId string
The id of target cluster.
clusterName string
The name of target cluster.
expiration string
Expiration time of kube config. Format: UTC time in rfc3339.
id string
The provider-assigned unique ID for this managed resource.
kubeConfig string
(Sensitive) The kube config to use to authenticate with the cluster.
outputFile string
temporaryDurationMinutes number
certificate_authority GetClusterCredentialCertificateAuthority
(Available in 1.105.0+) Nested attribute containing certificate authority data for your cluster.
cluster_id str
The id of target cluster.
cluster_name str
The name of target cluster.
expiration str
Expiration time of kube config. Format: UTC time in rfc3339.
id str
The provider-assigned unique ID for this managed resource.
kube_config str
(Sensitive) The kube config to use to authenticate with the cluster.
output_file str
temporary_duration_minutes int
certificateAuthority Property Map
(Available in 1.105.0+) Nested attribute containing certificate authority data for your cluster.
clusterId String
The id of target cluster.
clusterName String
The name of target cluster.
expiration String
Expiration time of kube config. Format: UTC time in rfc3339.
id String
The provider-assigned unique ID for this managed resource.
kubeConfig String
(Sensitive) The kube config to use to authenticate with the cluster.
outputFile String
temporaryDurationMinutes Number

Supporting Types

GetClusterCredentialCertificateAuthority

ClientCert This property is required. string
The base64 encoded client certificate data required to communicate with your cluster. Add this to the client-certificate-data section of the kube config file for your cluster.
ClientKey This property is required. string
The base64 encoded client key data required to communicate with your cluster. Add this to the client-key-data section of the kube config file for your cluster.
ClusterCert This property is required. string
The base64 encoded cluster certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kube config file for your cluster.
ClientCert This property is required. string
The base64 encoded client certificate data required to communicate with your cluster. Add this to the client-certificate-data section of the kube config file for your cluster.
ClientKey This property is required. string
The base64 encoded client key data required to communicate with your cluster. Add this to the client-key-data section of the kube config file for your cluster.
ClusterCert This property is required. string
The base64 encoded cluster certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kube config file for your cluster.
clientCert This property is required. String
The base64 encoded client certificate data required to communicate with your cluster. Add this to the client-certificate-data section of the kube config file for your cluster.
clientKey This property is required. String
The base64 encoded client key data required to communicate with your cluster. Add this to the client-key-data section of the kube config file for your cluster.
clusterCert This property is required. String
The base64 encoded cluster certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kube config file for your cluster.
clientCert This property is required. string
The base64 encoded client certificate data required to communicate with your cluster. Add this to the client-certificate-data section of the kube config file for your cluster.
clientKey This property is required. string
The base64 encoded client key data required to communicate with your cluster. Add this to the client-key-data section of the kube config file for your cluster.
clusterCert This property is required. string
The base64 encoded cluster certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kube config file for your cluster.
client_cert This property is required. str
The base64 encoded client certificate data required to communicate with your cluster. Add this to the client-certificate-data section of the kube config file for your cluster.
client_key This property is required. str
The base64 encoded client key data required to communicate with your cluster. Add this to the client-key-data section of the kube config file for your cluster.
cluster_cert This property is required. str
The base64 encoded cluster certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kube config file for your cluster.
clientCert This property is required. String
The base64 encoded client certificate data required to communicate with your cluster. Add this to the client-certificate-data section of the kube config file for your cluster.
clientKey This property is required. String
The base64 encoded client key data required to communicate with your cluster. Add this to the client-key-data section of the kube config file for your cluster.
clusterCert This property is required. String
The base64 encoded cluster certificate data required to communicate with your cluster. Add this to the certificate-authority-data section of the kube config file for your cluster.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi