ManagedResource
in package
FinalYes
Declares that a resource must exist, as part of a CONTRACT.md ยง27.6 manifest.
$parentKey names another ManagedResource's KEY, never a UUID: a manifest describes
a tenant that may not exist yet, and a UUID does not exist until the first apply.
Resources are the one kind where a manifest can describe an impossible shape โ a
parent cycle โ and ManifestValidation refuses one
before any request is sent.
Attributes
- #[Attribute]
- \Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE
Table of Contents
Properties
- $key : string
- $metadata : array<string|int, mixed>|null
- $name : string
- $parentKey : string|null
- $type : string
Methods
- __construct() : mixed
Properties
$key read-only
public
string
$key
$metadata read-only
public
array<string|int, mixed>|null
$metadata
= null
$name read-only
public
string
$name
$parentKey read-only
public
string|null
$parentKey
= null
$type read-only
public
string
$type
Methods
__construct()
public
__construct(string $key, string $name, string $type[, string|null $parentKey = null ][, array<string, mixed>|null $metadata = null ]) : mixed
Parameters
- $key : string
-
Manifest-local identity.
- $name : string
-
The resource's name on the server.
- $type : string
-
Its
resource_type. - $parentKey : string|null = null
-
The KEY of the parent resource, or
nullfor a root. - $metadata : array<string, mixed>|null = null
-
Free-form metadata.
null(the default) means UNSTATED;[]is a STATED empty object, distinct fromnullโ see ManifestBuilder::resource()'s identical$metadatadoc (CONTRACT 1.52 N6.5, C-12).