1. Packages
  2. Hsdp Provider
  3. API Docs
  4. AiWorkspace
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

hsdp.AiWorkspace

Explore with Pulumi AI

hsdp logo
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

    Manages HSDP AI Workspace instances

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hsdp from "@pulumi/hsdp";
    
    const workspace = hsdp.getConfig({
        service: "workspace",
    });
    const ws = workspace.then(workspace => hsdp.getAiWorkspaceServiceInstance({
        baseUrl: workspace.url,
        organizationId: _var.workspace_tenant_org_id,
    }));
    const workspace1 = new hsdp.AiWorkspace("workspace1", {
        endpoint: data.hsdp_ai_inference_service_instance.inference.endpoint,
        description: "Test workspace for my world changing algorithm",
        computeTarget: {
            identifier: hsdp_ai_workspace_compute_target.target.id,
        },
        sourceCode: {
            url: "git@github.com:loafoe/algo.git",
            branch: "main",
            commitId: "e1f9366",
            sshKey: "...",
        },
        labels: ["CNN"],
    });
    
    import pulumi
    import pulumi_hsdp as hsdp
    
    workspace = hsdp.get_config(service="workspace")
    ws = hsdp.get_ai_workspace_service_instance(base_url=workspace.url,
        organization_id=var["workspace_tenant_org_id"])
    workspace1 = hsdp.AiWorkspace("workspace1",
        endpoint=data["hsdp_ai_inference_service_instance"]["inference"]["endpoint"],
        description="Test workspace for my world changing algorithm",
        compute_target={
            "identifier": hsdp_ai_workspace_compute_target["target"]["id"],
        },
        source_code={
            "url": "git@github.com:loafoe/algo.git",
            "branch": "main",
            "commit_id": "e1f9366",
            "ssh_key": "...",
        },
        labels=["CNN"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		workspace, err := hsdp.GetConfig(ctx, &hsdp.GetConfigArgs{
    			Service: "workspace",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = hsdp.GetAiWorkspaceServiceInstance(ctx, &hsdp.GetAiWorkspaceServiceInstanceArgs{
    			BaseUrl:        workspace.Url,
    			OrganizationId: _var.Workspace_tenant_org_id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = hsdp.NewAiWorkspace(ctx, "workspace1", &hsdp.AiWorkspaceArgs{
    			Endpoint:    pulumi.Any(data.Hsdp_ai_inference_service_instance.Inference.Endpoint),
    			Description: pulumi.String("Test workspace for my world changing algorithm"),
    			ComputeTarget: &hsdp.AiWorkspaceComputeTargetTypeArgs{
    				Identifier: pulumi.Any(hsdp_ai_workspace_compute_target.Target.Id),
    			},
    			SourceCode: &hsdp.AiWorkspaceSourceCodeArgs{
    				Url:      pulumi.String("git@github.com:loafoe/algo.git"),
    				Branch:   pulumi.String("main"),
    				CommitId: pulumi.String("e1f9366"),
    				SshKey:   pulumi.String("..."),
    			},
    			Labels: pulumi.StringArray{
    				pulumi.String("CNN"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Hsdp = Pulumi.Hsdp;
    
    return await Deployment.RunAsync(() => 
    {
        var workspace = Hsdp.GetConfig.Invoke(new()
        {
            Service = "workspace",
        });
    
        var ws = Hsdp.GetAiWorkspaceServiceInstance.Invoke(new()
        {
            BaseUrl = workspace.Apply(getConfigResult => getConfigResult.Url),
            OrganizationId = @var.Workspace_tenant_org_id,
        });
    
        var workspace1 = new Hsdp.AiWorkspace("workspace1", new()
        {
            Endpoint = data.Hsdp_ai_inference_service_instance.Inference.Endpoint,
            Description = "Test workspace for my world changing algorithm",
            ComputeTarget = new Hsdp.Inputs.AiWorkspaceComputeTargetArgs
            {
                Identifier = hsdp_ai_workspace_compute_target.Target.Id,
            },
            SourceCode = new Hsdp.Inputs.AiWorkspaceSourceCodeArgs
            {
                Url = "git@github.com:loafoe/algo.git",
                Branch = "main",
                CommitId = "e1f9366",
                SshKey = "...",
            },
            Labels = new[]
            {
                "CNN",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hsdp.HsdpFunctions;
    import com.pulumi.hsdp.inputs.GetConfigArgs;
    import com.pulumi.hsdp.inputs.GetAiWorkspaceServiceInstanceArgs;
    import com.pulumi.hsdp.AiWorkspace;
    import com.pulumi.hsdp.AiWorkspaceArgs;
    import com.pulumi.hsdp.inputs.AiWorkspaceComputeTargetArgs;
    import com.pulumi.hsdp.inputs.AiWorkspaceSourceCodeArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var workspace = HsdpFunctions.getConfig(GetConfigArgs.builder()
                .service("workspace")
                .build());
    
            final var ws = HsdpFunctions.getAiWorkspaceServiceInstance(GetAiWorkspaceServiceInstanceArgs.builder()
                .baseUrl(workspace.applyValue(getConfigResult -> getConfigResult.url()))
                .organizationId(var_.workspace_tenant_org_id())
                .build());
    
            var workspace1 = new AiWorkspace("workspace1", AiWorkspaceArgs.builder()
                .endpoint(data.hsdp_ai_inference_service_instance().inference().endpoint())
                .description("Test workspace for my world changing algorithm")
                .computeTarget(AiWorkspaceComputeTargetArgs.builder()
                    .identifier(hsdp_ai_workspace_compute_target.target().id())
                    .build())
                .sourceCode(AiWorkspaceSourceCodeArgs.builder()
                    .url("git@github.com:loafoe/algo.git")
                    .branch("main")
                    .commitId("e1f9366")
                    .sshKey("...")
                    .build())
                .labels("CNN")
                .build());
    
        }
    }
    
    resources:
      workspace1:
        type: hsdp:AiWorkspace
        properties:
          endpoint: ${data.hsdp_ai_inference_service_instance.inference.endpoint}
          description: Test workspace for my world changing algorithm
          computeTarget:
            identifier: ${hsdp_ai_workspace_compute_target.target.id}
          sourceCode:
            url: git@github.com:loafoe/algo.git
            branch: main
            commitId: e1f9366
            sshKey: '...'
          labels:
            - CNN
    variables:
      workspace:
        fn::invoke:
          function: hsdp:getConfig
          arguments:
            service: workspace
      ws:
        fn::invoke:
          function: hsdp:getAiWorkspaceServiceInstance
          arguments:
            baseUrl: ${workspace.url}
            organizationId: ${var.workspace_tenant_org_id}
    

    Create AiWorkspace Resource

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

    Constructor syntax

    new AiWorkspace(name: string, args: AiWorkspaceArgs, opts?: CustomResourceOptions);
    @overload
    def AiWorkspace(resource_name: str,
                    args: AiWorkspaceArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def AiWorkspace(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    endpoint: Optional[str] = None,
                    additional_configuration: Optional[str] = None,
                    ai_workspace_id: Optional[str] = None,
                    compute_target: Optional[AiWorkspaceComputeTargetArgs] = None,
                    description: Optional[str] = None,
                    labels: Optional[Sequence[str]] = None,
                    name: Optional[str] = None,
                    source_code: Optional[AiWorkspaceSourceCodeArgs] = None)
    func NewAiWorkspace(ctx *Context, name string, args AiWorkspaceArgs, opts ...ResourceOption) (*AiWorkspace, error)
    public AiWorkspace(string name, AiWorkspaceArgs args, CustomResourceOptions? opts = null)
    public AiWorkspace(String name, AiWorkspaceArgs args)
    public AiWorkspace(String name, AiWorkspaceArgs args, CustomResourceOptions options)
    
    type: hsdp:AiWorkspace
    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 AiWorkspaceArgs
    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 AiWorkspaceArgs
    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 AiWorkspaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AiWorkspaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AiWorkspaceArgs
    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 aiWorkspaceResource = new Hsdp.AiWorkspace("aiWorkspaceResource", new()
    {
        Endpoint = "string",
        AdditionalConfiguration = "string",
        AiWorkspaceId = "string",
        ComputeTarget = new Hsdp.Inputs.AiWorkspaceComputeTargetArgs
        {
            Identifier = "string",
            Reference = "string",
        },
        Description = "string",
        Labels = new[]
        {
            "string",
        },
        Name = "string",
        SourceCode = new Hsdp.Inputs.AiWorkspaceSourceCodeArgs
        {
            Url = "string",
            Branch = "string",
            CommitId = "string",
            SshKey = "string",
        },
    });
    
    example, err := hsdp.NewAiWorkspace(ctx, "aiWorkspaceResource", &hsdp.AiWorkspaceArgs{
    	Endpoint:                pulumi.String("string"),
    	AdditionalConfiguration: pulumi.String("string"),
    	AiWorkspaceId:           pulumi.String("string"),
    	ComputeTarget: &hsdp.AiWorkspaceComputeTargetTypeArgs{
    		Identifier: pulumi.String("string"),
    		Reference:  pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	Labels: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	SourceCode: &hsdp.AiWorkspaceSourceCodeArgs{
    		Url:      pulumi.String("string"),
    		Branch:   pulumi.String("string"),
    		CommitId: pulumi.String("string"),
    		SshKey:   pulumi.String("string"),
    	},
    })
    
    var aiWorkspaceResource = new AiWorkspace("aiWorkspaceResource", AiWorkspaceArgs.builder()
        .endpoint("string")
        .additionalConfiguration("string")
        .aiWorkspaceId("string")
        .computeTarget(AiWorkspaceComputeTargetArgs.builder()
            .identifier("string")
            .reference("string")
            .build())
        .description("string")
        .labels("string")
        .name("string")
        .sourceCode(AiWorkspaceSourceCodeArgs.builder()
            .url("string")
            .branch("string")
            .commitId("string")
            .sshKey("string")
            .build())
        .build());
    
    ai_workspace_resource = hsdp.AiWorkspace("aiWorkspaceResource",
        endpoint="string",
        additional_configuration="string",
        ai_workspace_id="string",
        compute_target={
            "identifier": "string",
            "reference": "string",
        },
        description="string",
        labels=["string"],
        name="string",
        source_code={
            "url": "string",
            "branch": "string",
            "commit_id": "string",
            "ssh_key": "string",
        })
    
    const aiWorkspaceResource = new hsdp.AiWorkspace("aiWorkspaceResource", {
        endpoint: "string",
        additionalConfiguration: "string",
        aiWorkspaceId: "string",
        computeTarget: {
            identifier: "string",
            reference: "string",
        },
        description: "string",
        labels: ["string"],
        name: "string",
        sourceCode: {
            url: "string",
            branch: "string",
            commitId: "string",
            sshKey: "string",
        },
    });
    
    type: hsdp:AiWorkspace
    properties:
        additionalConfiguration: string
        aiWorkspaceId: string
        computeTarget:
            identifier: string
            reference: string
        description: string
        endpoint: string
        labels:
            - string
        name: string
        sourceCode:
            branch: string
            commitId: string
            sshKey: string
            url: string
    

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

    Endpoint string
    The AI Inference instance endpoint
    AdditionalConfiguration string
    AiWorkspaceId string
    The GUID of the Model
    ComputeTarget AiWorkspaceComputeTarget
    Description string
    Description of the Compute Target
    Labels List<string>
    Name string
    The name of the Model
    SourceCode AiWorkspaceSourceCode
    Endpoint string
    The AI Inference instance endpoint
    AdditionalConfiguration string
    AiWorkspaceId string
    The GUID of the Model
    ComputeTarget AiWorkspaceComputeTargetTypeArgs
    Description string
    Description of the Compute Target
    Labels []string
    Name string
    The name of the Model
    SourceCode AiWorkspaceSourceCodeArgs
    endpoint String
    The AI Inference instance endpoint
    additionalConfiguration String
    aiWorkspaceId String
    The GUID of the Model
    computeTarget AiWorkspaceComputeTarget
    description String
    Description of the Compute Target
    labels List<String>
    name String
    The name of the Model
    sourceCode AiWorkspaceSourceCode
    endpoint string
    The AI Inference instance endpoint
    additionalConfiguration string
    aiWorkspaceId string
    The GUID of the Model
    computeTarget AiWorkspaceComputeTarget
    description string
    Description of the Compute Target
    labels string[]
    name string
    The name of the Model
    sourceCode AiWorkspaceSourceCode
    endpoint str
    The AI Inference instance endpoint
    additional_configuration str
    ai_workspace_id str
    The GUID of the Model
    compute_target AiWorkspaceComputeTargetArgs
    description str
    Description of the Compute Target
    labels Sequence[str]
    name str
    The name of the Model
    source_code AiWorkspaceSourceCodeArgs
    endpoint String
    The AI Inference instance endpoint
    additionalConfiguration String
    aiWorkspaceId String
    The GUID of the Model
    computeTarget Property Map
    description String
    Description of the Compute Target
    labels List<String>
    name String
    The name of the Model
    sourceCode Property Map

    Outputs

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

    Created string
    The date this Model was created
    CreatedBy string
    Who created the Model
    Duration double
    Id string
    The provider-assigned unique ID for this managed resource.
    Reference string
    Status string
    StatusMessage string
    Created string
    The date this Model was created
    CreatedBy string
    Who created the Model
    Duration float64
    Id string
    The provider-assigned unique ID for this managed resource.
    Reference string
    Status string
    StatusMessage string
    created String
    The date this Model was created
    createdBy String
    Who created the Model
    duration Double
    id String
    The provider-assigned unique ID for this managed resource.
    reference String
    status String
    statusMessage String
    created string
    The date this Model was created
    createdBy string
    Who created the Model
    duration number
    id string
    The provider-assigned unique ID for this managed resource.
    reference string
    status string
    statusMessage string
    created str
    The date this Model was created
    created_by str
    Who created the Model
    duration float
    id str
    The provider-assigned unique ID for this managed resource.
    reference str
    status str
    status_message str
    created String
    The date this Model was created
    createdBy String
    Who created the Model
    duration Number
    id String
    The provider-assigned unique ID for this managed resource.
    reference String
    status String
    statusMessage String

    Look up Existing AiWorkspace Resource

    Get an existing AiWorkspace 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?: AiWorkspaceState, opts?: CustomResourceOptions): AiWorkspace
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            additional_configuration: Optional[str] = None,
            ai_workspace_id: Optional[str] = None,
            compute_target: Optional[AiWorkspaceComputeTargetArgs] = None,
            created: Optional[str] = None,
            created_by: Optional[str] = None,
            description: Optional[str] = None,
            duration: Optional[float] = None,
            endpoint: Optional[str] = None,
            labels: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            reference: Optional[str] = None,
            source_code: Optional[AiWorkspaceSourceCodeArgs] = None,
            status: Optional[str] = None,
            status_message: Optional[str] = None) -> AiWorkspace
    func GetAiWorkspace(ctx *Context, name string, id IDInput, state *AiWorkspaceState, opts ...ResourceOption) (*AiWorkspace, error)
    public static AiWorkspace Get(string name, Input<string> id, AiWorkspaceState? state, CustomResourceOptions? opts = null)
    public static AiWorkspace get(String name, Output<String> id, AiWorkspaceState state, CustomResourceOptions options)
    resources:  _:    type: hsdp:AiWorkspace    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:
    AdditionalConfiguration string
    AiWorkspaceId string
    The GUID of the Model
    ComputeTarget AiWorkspaceComputeTarget
    Created string
    The date this Model was created
    CreatedBy string
    Who created the Model
    Description string
    Description of the Compute Target
    Duration double
    Endpoint string
    The AI Inference instance endpoint
    Labels List<string>
    Name string
    The name of the Model
    Reference string
    SourceCode AiWorkspaceSourceCode
    Status string
    StatusMessage string
    AdditionalConfiguration string
    AiWorkspaceId string
    The GUID of the Model
    ComputeTarget AiWorkspaceComputeTargetTypeArgs
    Created string
    The date this Model was created
    CreatedBy string
    Who created the Model
    Description string
    Description of the Compute Target
    Duration float64
    Endpoint string
    The AI Inference instance endpoint
    Labels []string
    Name string
    The name of the Model
    Reference string
    SourceCode AiWorkspaceSourceCodeArgs
    Status string
    StatusMessage string
    additionalConfiguration String
    aiWorkspaceId String
    The GUID of the Model
    computeTarget AiWorkspaceComputeTarget
    created String
    The date this Model was created
    createdBy String
    Who created the Model
    description String
    Description of the Compute Target
    duration Double
    endpoint String
    The AI Inference instance endpoint
    labels List<String>
    name String
    The name of the Model
    reference String
    sourceCode AiWorkspaceSourceCode
    status String
    statusMessage String
    additionalConfiguration string
    aiWorkspaceId string
    The GUID of the Model
    computeTarget AiWorkspaceComputeTarget
    created string
    The date this Model was created
    createdBy string
    Who created the Model
    description string
    Description of the Compute Target
    duration number
    endpoint string
    The AI Inference instance endpoint
    labels string[]
    name string
    The name of the Model
    reference string
    sourceCode AiWorkspaceSourceCode
    status string
    statusMessage string
    additional_configuration str
    ai_workspace_id str
    The GUID of the Model
    compute_target AiWorkspaceComputeTargetArgs
    created str
    The date this Model was created
    created_by str
    Who created the Model
    description str
    Description of the Compute Target
    duration float
    endpoint str
    The AI Inference instance endpoint
    labels Sequence[str]
    name str
    The name of the Model
    reference str
    source_code AiWorkspaceSourceCodeArgs
    status str
    status_message str
    additionalConfiguration String
    aiWorkspaceId String
    The GUID of the Model
    computeTarget Property Map
    created String
    The date this Model was created
    createdBy String
    Who created the Model
    description String
    Description of the Compute Target
    duration Number
    endpoint String
    The AI Inference instance endpoint
    labels List<String>
    name String
    The name of the Model
    reference String
    sourceCode Property Map
    status String
    statusMessage String

    Supporting Types

    AiWorkspaceComputeTarget, AiWorkspaceComputeTargetArgs

    Identifier string
    Reference string
    Reference to the compute target
    Identifier string
    Reference string
    Reference to the compute target
    identifier String
    reference String
    Reference to the compute target
    identifier string
    reference string
    Reference to the compute target
    identifier str
    reference str
    Reference to the compute target
    identifier String
    reference String
    Reference to the compute target

    AiWorkspaceSourceCode, AiWorkspaceSourceCodeArgs

    Url string
    Branch string
    CommitId string
    SshKey string
    Url string
    Branch string
    CommitId string
    SshKey string
    url String
    branch String
    commitId String
    sshKey String
    url string
    branch string
    commitId string
    sshKey string
    url String
    branch String
    commitId String
    sshKey String

    Package Details

    Repository
    hsdp philips-software/terraform-provider-hsdp
    License
    Notes
    This Pulumi package is based on the hsdp Terraform Provider.
    hsdp logo
    hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software