Resource
- Implements: IResource
A construct which represents a resource.
Initializers
import ros_cdk_core
ros_cdk_core.Resource(
scope: Construct,
id: str,
physical_name: str = None
)
Name | Type | Description |
---|---|---|
scope |
Construct |
No description. |
id |
str |
No description. |
physical_name |
str |
The value passed in by users to the physical name prop of the resource. |
scope
Required
- Type: Construct
id
Required
- Type: str
physical_name
Optional
- Type: str
- Default: The physical name will be allocated at deployment time
The value passed in by users to the physical name prop of the resource.
undefined
implies that a physical name will be allocated during deployment.- a concrete value implies a specific physical name
PhysicalName.GENERATE_IF_NEEDED
is a marker that indicates that a physical will only be generated by the CDK if it is needed for cross-environment references. Otherwise, it will be allocated.
Methods
Name | Description |
---|---|
to_string |
Returns a string representation of this construct. |
synthesize |
Allows this construct to emit artifacts into the cloud assembly during synthesis. |
add_condition |
No description. |
add_count |
No description. |
add_dependency |
No description. |
add_resource_desc |
No description. |
apply_removal_policy |
No description. |
get_att |
No description. |
set_metadata |
No description. |
to_string
def to_string() -> str
Returns a string representation of this construct.
synthesize
def synthesize(
session: ISynthesisSession
) -> None
Allows this construct to emit artifacts into the cloud assembly during synthesis.
This method is usually implemented by framework-level constructs such as Stack
and Asset
as they participate in synthesizing the cloud assembly.
- Type: ISynthesisSession
The synthesis session.
add_condition
def add_condition(
condition: RosCondition
) -> None
- Type: RosCondition
add_count
def add_count(
count: typing.Union[typing.Union[int, float], IResolvable]
) -> None
- Type: typing.Union[typing.Union[int, float], IResolvable]
add_dependency
def add_dependency(
resource: Resource
) -> None
- Type: Resource
add_resource_desc
def add_resource_desc(
desc: str
) -> None
- Type: str
apply_removal_policy
def apply_removal_policy(
policy: RemovalPolicy
) -> None
- Type: RemovalPolicy
get_att
def get_att(
name: str
) -> IResolvable
- Type: str
set_metadata
def set_metadata(
key: str,
value: typing.Any
) -> None
- Type: str
- Type: typing.Any
Static Functions
Name | Description |
---|---|
is_construct |
Return whether the given object is a Construct. |
is_construct
import ros_cdk_core
ros_cdk_core.Resource.is_construct(
x: typing.Any
)
Return whether the given object is a Construct.
- Type: typing.Any
Properties
Name | Type | Description |
---|---|---|
node |
ConstructNode |
The construct tree node associated with this construct. |
ref |
str |
No description. |
stack |
Stack |
The stack in which this resource is defined. |
resource |
RosResource |
No description. |
node
Required
node: ConstructNode
- Type: ConstructNode
The construct tree node associated with this construct.
ref
Required
ref: str
- Type: str
stack
Required
stack: Stack
- Type: Stack
The stack in which this resource is defined.
resource
Optional
resource: RosResource
- Type: RosResource