DATASOURCE::CS::ClusterApplicationResources is used to query the details of specified types of resources in a Container Service for Kubernetes (ACK) cluster.
Syntax
{
"Type": "DATASOURCE::CS::ClusterApplicationResources",
"Properties": {
"FirstMatch": Boolean,
"ClusterId": String,
"Kind": String,
"JsonPath": String,
"Namespace": String,
"Name": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ClusterId | String | Yes | No | The ID of the cluster. | None. |
Kind | String | Yes | Yes | The type of the resource in the ACK cluster. | Valid values:
|
Name | String | No | Yes | The name of the ACK cluster. | None. |
Namespace | String | No | Yes | The namespace to which the ACK cluster belongs. | None. |
JsonPath | String | No | Yes | The JSONPath expression that you want to use to filter the returned results. | None. |
FirstMatch | Boolean | No | Yes | Specifies whether to return only the first matching result in the results that are filtered by using the JSONPath expression. | Default value: false. Valid values:
|
Return values (Fn::GetAtt)
Response: the data that is relevant to the resources in the ACK cluster.
Property | Type | Description | Constraint |
---|---|---|---|
metadata | Map | The metadata of the resource. | Example:
|
apiVersion | String | The version number of the API operation. | Example: v1. |
kind | String | The type of the resource in the ACK cluster. | Valid values:
|
items | List | Details of the resources in the ACK cluster. | This property is returned if the Name property is not specified.
Example:
|
Examples
The following sample code provides examples on how to query the details of Configmap in an ACK cluster by using DATASOURCE::CS::ClusterApplicationResources.-
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "ClusterId": { "Type": "String", "Description": "The ID of the kubernetes cluster." }, "Kind": { "Type": "String", "Description": "The kind of kubernetes resources to query.", "Default": "ConfigMap", "AllowedValues": [ "ConfigMap", "Service", "PodTemplate", "Namespace", "Secret", "Node", "ComponentStatus", "ReplicationController", "LimitRange", "ResourceQuota", "PersistentVolumeClaim", "ServiceAccount", "PersistentVolume", "Endpoints", "Binding", "Pod", "Event" ] } }, "Resources": { "ClusterApplicationResources": { "Type": "DATASOURCE::CS::ClusterApplicationResources", "Properties": { "ClusterId": { "Ref": "ClusterId" }, "Kind": { "Ref": "Kind" } } } }, "Outputs": { "Response": { "Description": "Query result of kubernetes resource(s).", "Value": { "Fn::GetAtt": [ "ClusterApplicationResources", "Response" ] } } } }