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>
- $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>
$metadata
= []
$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> $metadata = [] ]) : 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> = []
-
Free-form metadata.