published on Wednesday, Aug 19, 2026 by CAST AI
published on Wednesday, Aug 19, 2026 by CAST AI
Create WorkloadCustomMetricsDataSource Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkloadCustomMetricsDataSource(name: string, args: WorkloadCustomMetricsDataSourceArgs, opts?: CustomResourceOptions);@overload
def WorkloadCustomMetricsDataSource(resource_name: str,
args: WorkloadCustomMetricsDataSourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkloadCustomMetricsDataSource(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
prometheus: Optional[_workload.WorkloadCustomMetricsDataSourcePrometheusArgs] = None,
name: Optional[str] = None)func NewWorkloadCustomMetricsDataSource(ctx *Context, name string, args WorkloadCustomMetricsDataSourceArgs, opts ...ResourceOption) (*WorkloadCustomMetricsDataSource, error)public WorkloadCustomMetricsDataSource(string name, WorkloadCustomMetricsDataSourceArgs args, CustomResourceOptions? opts = null)
public WorkloadCustomMetricsDataSource(String name, WorkloadCustomMetricsDataSourceArgs args)
public WorkloadCustomMetricsDataSource(String name, WorkloadCustomMetricsDataSourceArgs args, CustomResourceOptions options)
type: castai:workload:WorkloadCustomMetricsDataSource
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "castai_workload_custom_metrics_data_source" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args WorkloadCustomMetricsDataSourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WorkloadCustomMetricsDataSourceArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WorkloadCustomMetricsDataSourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkloadCustomMetricsDataSourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkloadCustomMetricsDataSourceArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
WorkloadCustomMetricsDataSource Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The WorkloadCustomMetricsDataSource resource accepts the following input properties:
- Cluster
Id string - CAST AI cluster ID.
- Prometheus
Pulumi.
Cast AI. Workload. Inputs. Workload Custom Metrics Data Source Prometheus - Prometheus data source configuration.
- Name string
- Name of the custom metrics data source (1-63 characters).
- Cluster
Id string - CAST AI cluster ID.
- Prometheus
Workload
Custom Metrics Data Source Prometheus Args - Prometheus data source configuration.
- Name string
- Name of the custom metrics data source (1-63 characters).
- cluster_
id string - CAST AI cluster ID.
- prometheus object
- Prometheus data source configuration.
- name string
- Name of the custom metrics data source (1-63 characters).
- cluster
Id String - CAST AI cluster ID.
- prometheus
Workload
Custom Metrics Data Source Prometheus - Prometheus data source configuration.
- name String
- Name of the custom metrics data source (1-63 characters).
- cluster
Id string - CAST AI cluster ID.
- prometheus
workload
Workload Custom Metrics Data Source Prometheus - Prometheus data source configuration.
- name string
- Name of the custom metrics data source (1-63 characters).
- cluster_
id str - CAST AI cluster ID.
- prometheus
workload.
Workload Custom Metrics Data Source Prometheus Args - Prometheus data source configuration.
- name str
- Name of the custom metrics data source (1-63 characters).
- cluster
Id String - CAST AI cluster ID.
- prometheus Property Map
- Prometheus data source configuration.
- name String
- Name of the custom metrics data source (1-63 characters).
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkloadCustomMetricsDataSource resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Kube
Resource stringName - Name of the corresponding Kubernetes resource.
- Managed
By boolCast - Whether the data source is managed by CAST AI.
- Status string
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- Id string
- The provider-assigned unique ID for this managed resource.
- Kube
Resource stringName - Name of the corresponding Kubernetes resource.
- Managed
By boolCast - Whether the data source is managed by CAST AI.
- Status string
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- id string
- The provider-assigned unique ID for this managed resource.
- kube_
resource_ stringname - Name of the corresponding Kubernetes resource.
- managed_
by_ boolcast - Whether the data source is managed by CAST AI.
- status string
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- id String
- The provider-assigned unique ID for this managed resource.
- kube
Resource StringName - Name of the corresponding Kubernetes resource.
- managed
By BooleanCast - Whether the data source is managed by CAST AI.
- status String
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- id string
- The provider-assigned unique ID for this managed resource.
- kube
Resource stringName - Name of the corresponding Kubernetes resource.
- managed
By booleanCast - Whether the data source is managed by CAST AI.
- status string
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- id str
- The provider-assigned unique ID for this managed resource.
- kube_
resource_ strname - Name of the corresponding Kubernetes resource.
- managed_
by_ boolcast - Whether the data source is managed by CAST AI.
- status str
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- id String
- The provider-assigned unique ID for this managed resource.
- kube
Resource StringName - Name of the corresponding Kubernetes resource.
- managed
By BooleanCast - Whether the data source is managed by CAST AI.
- status String
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
Look up Existing WorkloadCustomMetricsDataSource Resource
Get an existing WorkloadCustomMetricsDataSource resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WorkloadCustomMetricsDataSourceState, opts?: CustomResourceOptions): WorkloadCustomMetricsDataSource@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
kube_resource_name: Optional[str] = None,
managed_by_cast: Optional[bool] = None,
name: Optional[str] = None,
prometheus: Optional[_workload.WorkloadCustomMetricsDataSourcePrometheusArgs] = None,
status: Optional[str] = None) -> WorkloadCustomMetricsDataSourcefunc GetWorkloadCustomMetricsDataSource(ctx *Context, name string, id IDInput, state *WorkloadCustomMetricsDataSourceState, opts ...ResourceOption) (*WorkloadCustomMetricsDataSource, error)public static WorkloadCustomMetricsDataSource Get(string name, Input<string> id, WorkloadCustomMetricsDataSourceState? state, CustomResourceOptions? opts = null)public static WorkloadCustomMetricsDataSource get(String name, Output<String> id, WorkloadCustomMetricsDataSourceState state, CustomResourceOptions options)resources: _: type: castai:workload:WorkloadCustomMetricsDataSource get: id: ${id}import {
to = castai_workload_custom_metrics_data_source.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Cluster
Id string - CAST AI cluster ID.
- Kube
Resource stringName - Name of the corresponding Kubernetes resource.
- Managed
By boolCast - Whether the data source is managed by CAST AI.
- Name string
- Name of the custom metrics data source (1-63 characters).
- Prometheus
Pulumi.
Cast AI. Workload. Inputs. Workload Custom Metrics Data Source Prometheus - Prometheus data source configuration.
- Status string
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- Cluster
Id string - CAST AI cluster ID.
- Kube
Resource stringName - Name of the corresponding Kubernetes resource.
- Managed
By boolCast - Whether the data source is managed by CAST AI.
- Name string
- Name of the custom metrics data source (1-63 characters).
- Prometheus
Workload
Custom Metrics Data Source Prometheus Args - Prometheus data source configuration.
- Status string
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- cluster_
id string - CAST AI cluster ID.
- kube_
resource_ stringname - Name of the corresponding Kubernetes resource.
- managed_
by_ boolcast - Whether the data source is managed by CAST AI.
- name string
- Name of the custom metrics data source (1-63 characters).
- prometheus object
- Prometheus data source configuration.
- status string
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- cluster
Id String - CAST AI cluster ID.
- kube
Resource StringName - Name of the corresponding Kubernetes resource.
- managed
By BooleanCast - Whether the data source is managed by CAST AI.
- name String
- Name of the custom metrics data source (1-63 characters).
- prometheus
Workload
Custom Metrics Data Source Prometheus - Prometheus data source configuration.
- status String
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- cluster
Id string - CAST AI cluster ID.
- kube
Resource stringName - Name of the corresponding Kubernetes resource.
- managed
By booleanCast - Whether the data source is managed by CAST AI.
- name string
- Name of the custom metrics data source (1-63 characters).
- prometheus
workload
Workload Custom Metrics Data Source Prometheus - Prometheus data source configuration.
- status string
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- cluster_
id str - CAST AI cluster ID.
- kube_
resource_ strname - Name of the corresponding Kubernetes resource.
- managed_
by_ boolcast - Whether the data source is managed by CAST AI.
- name str
- Name of the custom metrics data source (1-63 characters).
- prometheus
workload.
Workload Custom Metrics Data Source Prometheus Args - Prometheus data source configuration.
- status str
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
- cluster
Id String - CAST AI cluster ID.
- kube
Resource StringName - Name of the corresponding Kubernetes resource.
- managed
By BooleanCast - Whether the data source is managed by CAST AI.
- name String
- Name of the custom metrics data source (1-63 characters).
- prometheus Property Map
- Prometheus data source configuration.
- status String
- Synchronization status of the data source (CONNECTING, CONNECTED, SYNCING, FAILED).
Supporting Types
WorkloadCustomMetricsDataSourcePrometheus, WorkloadCustomMetricsDataSourcePrometheusArgs
- Url string
- URL of the Prometheus server.
- Metrics
List<Pulumi.
Cast AI. Workload. Inputs. Workload Custom Metrics Data Source Prometheus Metric> - Manually defined metrics. Use this for advanced use cases where presets don't cover your needs. Each entry defines a single metric name and PromQL query. To specify multiple queries for the same metric, use multiple entries with the same name.
- Presets List<string>
- List of metric presets managed by CAST AI. Presets provide curated metric definitions that are kept up to date automatically. This is the recommended approach for most users. Currently available: "jvm".
- Timeout string
- Timeout for Prometheus queries (e.g. "30s").
- Url string
- URL of the Prometheus server.
- Metrics
Workload
Custom Metrics Data Source Prometheus Metric - Manually defined metrics. Use this for advanced use cases where presets don't cover your needs. Each entry defines a single metric name and PromQL query. To specify multiple queries for the same metric, use multiple entries with the same name.
- Presets []string
- List of metric presets managed by CAST AI. Presets provide curated metric definitions that are kept up to date automatically. This is the recommended approach for most users. Currently available: "jvm".
- Timeout string
- Timeout for Prometheus queries (e.g. "30s").
- url string
- URL of the Prometheus server.
- metrics list(object)
- Manually defined metrics. Use this for advanced use cases where presets don't cover your needs. Each entry defines a single metric name and PromQL query. To specify multiple queries for the same metric, use multiple entries with the same name.
- presets list(string)
- List of metric presets managed by CAST AI. Presets provide curated metric definitions that are kept up to date automatically. This is the recommended approach for most users. Currently available: "jvm".
- timeout string
- Timeout for Prometheus queries (e.g. "30s").
- url String
- URL of the Prometheus server.
- metrics
List<Workload
Custom Metrics Data Source Prometheus Metric> - Manually defined metrics. Use this for advanced use cases where presets don't cover your needs. Each entry defines a single metric name and PromQL query. To specify multiple queries for the same metric, use multiple entries with the same name.
- presets List<String>
- List of metric presets managed by CAST AI. Presets provide curated metric definitions that are kept up to date automatically. This is the recommended approach for most users. Currently available: "jvm".
- timeout String
- Timeout for Prometheus queries (e.g. "30s").
- url string
- URL of the Prometheus server.
- metrics
workload
Workload Custom Metrics Data Source Prometheus Metric[] - Manually defined metrics. Use this for advanced use cases where presets don't cover your needs. Each entry defines a single metric name and PromQL query. To specify multiple queries for the same metric, use multiple entries with the same name.
- presets string[]
- List of metric presets managed by CAST AI. Presets provide curated metric definitions that are kept up to date automatically. This is the recommended approach for most users. Currently available: "jvm".
- timeout string
- Timeout for Prometheus queries (e.g. "30s").
- url str
- URL of the Prometheus server.
- metrics
Sequence[workload.
Workload Custom Metrics Data Source Prometheus Metric] - Manually defined metrics. Use this for advanced use cases where presets don't cover your needs. Each entry defines a single metric name and PromQL query. To specify multiple queries for the same metric, use multiple entries with the same name.
- presets Sequence[str]
- List of metric presets managed by CAST AI. Presets provide curated metric definitions that are kept up to date automatically. This is the recommended approach for most users. Currently available: "jvm".
- timeout str
- Timeout for Prometheus queries (e.g. "30s").
- url String
- URL of the Prometheus server.
- metrics List<Property Map>
- Manually defined metrics. Use this for advanced use cases where presets don't cover your needs. Each entry defines a single metric name and PromQL query. To specify multiple queries for the same metric, use multiple entries with the same name.
- presets List<String>
- List of metric presets managed by CAST AI. Presets provide curated metric definitions that are kept up to date automatically. This is the recommended approach for most users. Currently available: "jvm".
- timeout String
- Timeout for Prometheus queries (e.g. "30s").
WorkloadCustomMetricsDataSourcePrometheusMetric, WorkloadCustomMetricsDataSourcePrometheusMetricArgs
Package Details
- Repository
- castai castai/pulumi-castai
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
castaiTerraform Provider.
published on Wednesday, Aug 19, 2026 by CAST AI