Component Class

Base class for component version, used to define a component. Can't be instantiated directly.

Constructor

Component(*, name: str | None = None, version: str | None = None, id: str | None = None, type: str | None = None, description: str | None = None, tags: Dict | None = None, properties: Dict | None = None, display_name: str | None = None, is_deterministic: bool = True, inputs: Dict | None = None, outputs: Dict | None = None, yaml_str: str | None = None, _schema: str | None = None, creation_context: SystemData | None = None, **kwargs: Any)

Parameters

Name Description
kwargs
Required

Additional parameters for the component.

Keyword-Only Parameters

Name Description
name
str

Name of the resource.

Default value: None
version
str

Version of the resource.

Default value: None
id
str

Global ID of the resource, Azure Resource Manager ID.

Default value: None
type
str

Type of the command, supported is 'command'.

Default value: None
description
str

Description of the resource.

Default value: None
tags

Tag dictionary. Tags can be added, removed, and updated.

Default value: None
properties

Internal use only.

Default value: None
display_name
str

Display name of the component.

Default value: None
is_deterministic

Whether the component is deterministic. Defaults to True.

Default value: True
inputs

Inputs of the component.

Default value: None
outputs

Outputs of the component.

Default value: None
yaml_str
str

The YAML string of the component.

Default value: None
_schema
str

Schema of the component.

Default value: None
creation_context

Creation metadata of the component.

Default value: None

Methods

dump

Dump the component content into a file in yaml format.

dump

Dump the component content into a file in yaml format.

dump(dest: str | PathLike | IO, **kwargs: Any) -> None

Parameters

Name Description
dest
Required
Union[<xref:PathLike>, str, IO[AnyStr]]

The destination to receive this component's content. Must be either a path to a local file, or an already-open file stream. If dest is a file path, a new file will be created, and an exception is raised if the file exists. If dest is an open file, the file will be written to directly, and an exception will be raised if the file is not writable.

Attributes

base_path

The base path of the resource.

Returns

Type Description
str

The base path of the resource.

creation_context

The creation context of the resource.

Returns

Type Description

The creation metadata for the resource.

display_name

Display name of the component.

Returns

Type Description
str

Display name of the component.

id

The resource ID.

Returns

Type Description

The global ID of the resource, an Azure Resource Manager (ARM) ID.

inputs

Inputs of the component.

Returns

Type Description

Inputs of the component.

is_deterministic

Whether the component is deterministic.

Returns

Type Description

Whether the component is deterministic

outputs

Outputs of the component.

Returns

Type Description

Outputs of the component.

type

Type of the component, default is 'command'.

Returns

Type Description
str

Type of the component.

version

Version of the component.

Returns

Type Description
str

Version of the component.