Resource Class
Base class for entity classes.
Resource is an abstract object that serves as a base for creating resources. It contains common properties and methods for all resources.
This class should not be instantiated directly. Instead, use one of its subclasses.
- Inheritance
-
Resource
Constructor
Resource(name: str | None, description: str | None = None, tags: Dict | None = None, properties: Dict | None = None, **kwargs: Any)
Parameters
Name | Description |
---|---|
name
Required
|
The name of the resource. |
description
|
The description of the resource. Default value: None
|
tags
|
Tags can be added, removed, and updated. Default value: None
|
properties
|
The resource's property dictionary. Default value: None
|
Keyword-Only Parameters
Name | Description |
---|---|
print_as_yaml
|
Specifies if the the resource should print out as a YAML-formatted object. If False, the resource will print out in a more-compact style. By default, the YAML output is only used in Jupyter notebooks. Be aware that some bookkeeping values are shown only in the non-YAML output. |
Methods
dump |
Dump the object content into a file. |
dump
Dump the object content into a file.
abstract dump(dest: str | PathLike | IO, **kwargs: Any) -> Any
Parameters
Name | Description |
---|---|
dest
Required
|
The local path or file stream to write the YAML content to. If dest is a file path, a new file will be created. If dest is an open file, the file will be written to directly. |
Attributes
base_path
creation_context
The creation context of the resource.
Returns
Type | Description |
---|---|
The creation metadata for the resource. |
id
Azure SDK for Python