published on Tuesday, Nov 17, 2026 by Defang
defang-scalewaypublished on Tuesday, Nov 17, 2026 by Defang
The model selected for a managed model service. Created by Project; unchanged inputs keep the selected model, and refresh never re-resolves it.
Create ModelSelection Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ModelSelection(name: string, args: ModelSelectionArgs, opts?: CustomResourceOptions);@overload
def ModelSelection(resource_name: str,
args: ModelSelectionArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ModelSelection(resource_name: str,
opts: Optional[ResourceOptions] = None,
candidates: Optional[Sequence[_compose.ModelCandidateArgs]] = None,
request: Optional[str] = None,
source: Optional[str] = None,
region: Optional[str] = None,
role: Optional[str] = None,
scope: Optional[str] = None,
seed: Optional[_compose.ModelTargetArgs] = None)func NewModelSelection(ctx *Context, name string, args ModelSelectionArgs, opts ...ResourceOption) (*ModelSelection, error)public ModelSelection(string name, ModelSelectionArgs args, CustomResourceOptions? opts = null)
public ModelSelection(String name, ModelSelectionArgs args)
public ModelSelection(String name, ModelSelectionArgs args, CustomResourceOptions options)
type: defang-scaleway:ModelSelection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "defang-scaleway_model_selection" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ModelSelectionArgs
- 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 ModelSelectionArgs
- 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 ModelSelectionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ModelSelectionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ModelSelectionArgs
- 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 modelSelectionResource = new DefangScaleway.ModelSelection("modelSelectionResource", new()
{
Candidates = new[]
{
new DefangScaleway.Compose.Inputs.ModelCandidateArgs
{
Model = "string",
AllowPreview = false,
Format = "string",
Location = "string",
Role = "string",
Sku = "string",
Version = "string",
},
},
Request = "string",
Source = "string",
Region = "string",
Role = "string",
Scope = "string",
Seed = new DefangScaleway.Compose.Inputs.ModelTargetArgs
{
Existed = false,
Format = "string",
Location = "string",
Model = "string",
Sku = "string",
Version = "string",
},
});
example, err := defangscaleway.NewModelSelection(ctx, "modelSelectionResource", &defangscaleway.ModelSelectionArgs{
Candidates: compose.ModelCandidateArray{
&compose.ModelCandidateArgs{
Model: pulumi.String("string"),
AllowPreview: pulumi.Bool(false),
Format: pulumi.String("string"),
Location: pulumi.String("string"),
Role: pulumi.String("string"),
Sku: pulumi.String("string"),
Version: pulumi.String("string"),
},
},
Request: pulumi.String("string"),
Source: pulumi.String("string"),
Region: pulumi.String("string"),
Role: pulumi.String("string"),
Scope: pulumi.String("string"),
Seed: &compose.ModelTargetArgs{
Existed: pulumi.Bool(false),
Format: pulumi.String("string"),
Location: pulumi.String("string"),
Model: pulumi.String("string"),
Sku: pulumi.String("string"),
Version: pulumi.String("string"),
},
})
resource "defang-scaleway_model_selection" "modelSelectionResource" {
lifecycle {
create_before_destroy = true
}
candidates {
model = "string"
allow_preview = false
format = "string"
location = "string"
role = "string"
sku = "string"
version = "string"
}
request = "string"
source = "string"
region = "string"
role = "string"
scope = "string"
seed = {
existed = false
format = "string"
location = "string"
model = "string"
sku = "string"
version = "string"
}
}
var modelSelectionResource = new ModelSelection("modelSelectionResource", ModelSelectionArgs.builder()
.candidates(ModelCandidateArgs.builder()
.model("string")
.allowPreview(false)
.format("string")
.location("string")
.role("string")
.sku("string")
.version("string")
.build())
.request("string")
.source("string")
.region("string")
.role("string")
.scope("string")
.seed(ModelTargetArgs.builder()
.existed(false)
.format("string")
.location("string")
.model("string")
.sku("string")
.version("string")
.build())
.build());
model_selection_resource = defang_scaleway.ModelSelection("modelSelectionResource",
candidates=[{
"model": "string",
"allow_preview": False,
"format": "string",
"location": "string",
"role": "string",
"sku": "string",
"version": "string",
}],
request="string",
source="string",
region="string",
role="string",
scope="string",
seed={
"existed": False,
"format": "string",
"location": "string",
"model": "string",
"sku": "string",
"version": "string",
})
const modelSelectionResource = new defang_scaleway.ModelSelection("modelSelectionResource", {
candidates: [{
model: "string",
allowPreview: false,
format: "string",
location: "string",
role: "string",
sku: "string",
version: "string",
}],
request: "string",
source: "string",
region: "string",
role: "string",
scope: "string",
seed: {
existed: false,
format: "string",
location: "string",
model: "string",
sku: "string",
version: "string",
},
});
type: defang-scaleway:ModelSelection
properties:
candidates:
- allowPreview: false
format: string
location: string
model: string
role: string
sku: string
version: string
region: string
request: string
role: string
scope: string
seed:
existed: false
format: string
location: string
model: string
sku: string
version: string
source: string
ModelSelection 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 ModelSelection resource accepts the following input properties:
- Candidates
Model
Candidate Args - Request string
- Source string
- Region string
- Role string
- Scope string
- Seed
Model
Target Args
- candidates list(object)
- request string
- source string
- region string
- role string
- scope string
- seed object
- candidates
List<Model
Candidate> - request String
- source String
- region String
- role String
- scope String
- seed
Model
Target
- candidates
compose
Model Candidate[] - request string
- source string
- region string
- role string
- scope string
- seed
compose
Model Target
- candidates List<Property Map>
- request String
- source String
- region String
- role String
- scope String
- seed Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ModelSelection resource produces the following output properties:
Look up Existing ModelSelection Resource
Get an existing ModelSelection 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>, opts?: CustomResourceOptions): ModelSelection@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None) -> ModelSelectionfunc GetModelSelection(ctx *Context, name string, id IDInput, state *ModelSelectionState, opts ...ResourceOption) (*ModelSelection, error)public static ModelSelection Get(string name, Input<string> id, CustomResourceOptions? opts = null)public static ModelSelection get(String name, Output<String> id, CustomResourceOptions options)resources: existingModelSelection: type: defang-scaleway:ModelSelection get: id: ${id}import {
to = defang-scaleway_model_selection.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state ModelSelectionState
- Pass nil. This resource has no state arguments.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Supporting Types
ModelCandidate, ModelCandidateArgs
ModelTarget, ModelTargetArgs
Package Details
- Repository
- defang-scaleway DefangLabs/pulumi-defang
- License
- Apache-2.0
defang-scalewaypublished on Tuesday, Nov 17, 2026 by Defang