1. Packages
  2. CAST AI
  3. API Docs
  4. AllocationGroup
CAST AI v7.73.2 published on Wednesday, Oct 29, 2025 by CAST AI

castai.AllocationGroup

Get Started
castai logo
CAST AI v7.73.2 published on Wednesday, Oct 29, 2025 by CAST AI

    Create AllocationGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AllocationGroup(name: string, args?: AllocationGroupArgs, opts?: CustomResourceOptions);
    @overload
    def AllocationGroup(resource_name: str,
                        args: Optional[AllocationGroupArgs] = None,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def AllocationGroup(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        cluster_ids: Optional[Sequence[str]] = None,
                        labels: Optional[Mapping[str, str]] = None,
                        labels_operator: Optional[str] = None,
                        name: Optional[str] = None,
                        namespaces: Optional[Sequence[str]] = None)
    func NewAllocationGroup(ctx *Context, name string, args *AllocationGroupArgs, opts ...ResourceOption) (*AllocationGroup, error)
    public AllocationGroup(string name, AllocationGroupArgs? args = null, CustomResourceOptions? opts = null)
    public AllocationGroup(String name, AllocationGroupArgs args)
    public AllocationGroup(String name, AllocationGroupArgs args, CustomResourceOptions options)
    
    type: castai:AllocationGroup
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AllocationGroupArgs
    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 AllocationGroupArgs
    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 AllocationGroupArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AllocationGroupArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AllocationGroupArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var allocationGroupResource = new CastAI.AllocationGroup("allocationGroupResource", new()
    {
        ClusterIds = new[]
        {
            "string",
        },
        Labels = 
        {
            { "string", "string" },
        },
        LabelsOperator = "string",
        Name = "string",
        Namespaces = new[]
        {
            "string",
        },
    });
    
    example, err := castai.NewAllocationGroup(ctx, "allocationGroupResource", &castai.AllocationGroupArgs{
    	ClusterIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	LabelsOperator: pulumi.String("string"),
    	Name:           pulumi.String("string"),
    	Namespaces: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var allocationGroupResource = new AllocationGroup("allocationGroupResource", AllocationGroupArgs.builder()
        .clusterIds("string")
        .labels(Map.of("string", "string"))
        .labelsOperator("string")
        .name("string")
        .namespaces("string")
        .build());
    
    allocation_group_resource = castai.AllocationGroup("allocationGroupResource",
        cluster_ids=["string"],
        labels={
            "string": "string",
        },
        labels_operator="string",
        name="string",
        namespaces=["string"])
    
    const allocationGroupResource = new castai.AllocationGroup("allocationGroupResource", {
        clusterIds: ["string"],
        labels: {
            string: "string",
        },
        labelsOperator: "string",
        name: "string",
        namespaces: ["string"],
    });
    
    type: castai:AllocationGroup
    properties:
        clusterIds:
            - string
        labels:
            string: string
        labelsOperator: string
        name: string
        namespaces:
            - string
    

    AllocationGroup 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 AllocationGroup resource accepts the following input properties:

    ClusterIds List<string>
    List of CAST AI cluster ids
    Labels Dictionary<string, string>
    Labels used to select workloads to track
    LabelsOperator string
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    Name string
    Allocation group name
    Namespaces List<string>
    List of cluster namespaces to track
    ClusterIds []string
    List of CAST AI cluster ids
    Labels map[string]string
    Labels used to select workloads to track
    LabelsOperator string
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    Name string
    Allocation group name
    Namespaces []string
    List of cluster namespaces to track
    clusterIds List<String>
    List of CAST AI cluster ids
    labels Map<String,String>
    Labels used to select workloads to track
    labelsOperator String
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    name String
    Allocation group name
    namespaces List<String>
    List of cluster namespaces to track
    clusterIds string[]
    List of CAST AI cluster ids
    labels {[key: string]: string}
    Labels used to select workloads to track
    labelsOperator string
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    name string
    Allocation group name
    namespaces string[]
    List of cluster namespaces to track
    cluster_ids Sequence[str]
    List of CAST AI cluster ids
    labels Mapping[str, str]
    Labels used to select workloads to track
    labels_operator str
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    name str
    Allocation group name
    namespaces Sequence[str]
    List of cluster namespaces to track
    clusterIds List<String>
    List of CAST AI cluster ids
    labels Map<String>
    Labels used to select workloads to track
    labelsOperator String
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    name String
    Allocation group name
    namespaces List<String>
    List of cluster namespaces to track

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AllocationGroup resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AllocationGroup Resource

    Get an existing AllocationGroup 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?: AllocationGroupState, opts?: CustomResourceOptions): AllocationGroup
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster_ids: Optional[Sequence[str]] = None,
            labels: Optional[Mapping[str, str]] = None,
            labels_operator: Optional[str] = None,
            name: Optional[str] = None,
            namespaces: Optional[Sequence[str]] = None) -> AllocationGroup
    func GetAllocationGroup(ctx *Context, name string, id IDInput, state *AllocationGroupState, opts ...ResourceOption) (*AllocationGroup, error)
    public static AllocationGroup Get(string name, Input<string> id, AllocationGroupState? state, CustomResourceOptions? opts = null)
    public static AllocationGroup get(String name, Output<String> id, AllocationGroupState state, CustomResourceOptions options)
    resources:  _:    type: castai:AllocationGroup    get:      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.
    The following state arguments are supported:
    ClusterIds List<string>
    List of CAST AI cluster ids
    Labels Dictionary<string, string>
    Labels used to select workloads to track
    LabelsOperator string
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    Name string
    Allocation group name
    Namespaces List<string>
    List of cluster namespaces to track
    ClusterIds []string
    List of CAST AI cluster ids
    Labels map[string]string
    Labels used to select workloads to track
    LabelsOperator string
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    Name string
    Allocation group name
    Namespaces []string
    List of cluster namespaces to track
    clusterIds List<String>
    List of CAST AI cluster ids
    labels Map<String,String>
    Labels used to select workloads to track
    labelsOperator String
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    name String
    Allocation group name
    namespaces List<String>
    List of cluster namespaces to track
    clusterIds string[]
    List of CAST AI cluster ids
    labels {[key: string]: string}
    Labels used to select workloads to track
    labelsOperator string
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    name string
    Allocation group name
    namespaces string[]
    List of cluster namespaces to track
    cluster_ids Sequence[str]
    List of CAST AI cluster ids
    labels Mapping[str, str]
    Labels used to select workloads to track
    labels_operator str
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    name str
    Allocation group name
    namespaces Sequence[str]
    List of cluster namespaces to track
    clusterIds List<String>
    List of CAST AI cluster ids
    labels Map<String>
    Labels used to select workloads to track
    labelsOperator String
    Operator with which to connect the labels OR (default) - workload needs to have at least one label to be included AND - workload needs to have all the labels to be included
    name String
    Allocation group name
    namespaces List<String>
    List of cluster namespaces to track

    Package Details

    Repository
    castai castai/pulumi-castai
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the castai Terraform Provider.
    castai logo
    CAST AI v7.73.2 published on Wednesday, Oct 29, 2025 by CAST AI
      Meet Neo: Your AI Platform Teammate