Skip to main content

BaseResourceSchema

The schema every resource schema extends.

A resource schema narrows properties and response to the fields that resource actually has; the remaining members are the same for all resources.

@example
export class MyResourceSchema extends BaseResourceSchema {
override properties = Schema<{ bucketName: string }>();
override response = Schema<{ arn: string }>();
}
@group

Resources

Index

Constructors

constructor

Properties

localResourceId

localResourceId: string = ...

The ID the resource was created with, unique within its scope.

parents

parents: IResourceReference[] = ...

The resources this one is built on top of.

properties

properties: {} = ...

The desired configuration of the resource, i.e. what you asked the cloud provider for.


Type declaration

  • [key string]: unknown

resourceId

resourceId: string = ...

The ID of the resource, unique across the infrastructure: its localResourceId, followed by a hash of its scope when it has one.

response

response: {} = ...

What the cloud provider reported back once the resource existed. Empty until then.


Type declaration

  • [key string]: string

scope

scope: string[] = ...

The contexts of the models the resource is placed under, derived from where the node creating it sits in the model graph. Octo sets it; a resource created outside a model action has none.

tags

tags: {} = ...

The tags applied to the resource.


Type declaration

  • [key string]: string