interface IGuardrail
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Bedrock.Alpha.IGuardrail |
![]() | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#IGuardrail |
![]() | software.amazon.awscdk.services.bedrock.alpha.IGuardrail |
![]() | aws_cdk.aws_bedrock_alpha.IGuardrail |
![]() | @aws-cdk/aws-bedrock-alpha ยป IGuardrail |
Implemented by
Guardrail
Obtainable from
Guardrail
.fromCfnGuardrail()
, Guardrail
.fromGuardrailAttributes()
Represents a Guardrail, either created with CDK or imported.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
guardrail | string | The ARN of the guardrail. |
guardrail | string | The ID of the guardrail. |
guardrail | string | The version of the guardrail. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
kms | IKey | Optional KMS encryption key associated with this guardrail. |
last | string | When this guardrail was last updated. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
guardrailArn
Type:
string
The ARN of the guardrail.
guardrailId
Type:
string
The ID of the guardrail.
guardrailVersion
Type:
string
The version of the guardrail.
If no explicit version is created, this will default to "DRAFT"
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
kmsKey?
Type:
IKey
(optional)
Optional KMS encryption key associated with this guardrail.
lastUpdated?
Type:
string
(optional)
When this guardrail was last updated.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
grant(grantee, ...actions) | Grant the given principal identity permissions to perform actions on this guardrail. |
grant | Grant the given identity permissions to apply the guardrail. |
metric(metricName, props?) | Return the given named metric for this guardrail. |
metric | Return the invocation client errors metric for this guardrail. |
metric | Return the invocation latency metric for this guardrail. |
metric | Return the invocation server errors metric for this guardrail. |
metric | Return the invocation throttles metric for this guardrail. |
metric | Return the invocations metric for this guardrail. |
metric | Return the invocations intervened metric for this guardrail. |
metric | Return the text unit count metric for this guardrail. |
applyRemovalPolicy(policy)
public applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable
- actions
string
Returns
Grant the given principal identity permissions to perform actions on this guardrail.
grantApply(grantee)
public grantApply(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given identity permissions to apply the guardrail.
metric(metricName, props?)
public metric(metricName: string, props?: MetricOptions): Metric
Parameters
- metricName
string
- props
Metric
Options
Returns
Return the given named metric for this guardrail.
metricInvocationClientErrors(props?)
public metricInvocationClientErrors(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Return the invocation client errors metric for this guardrail.
metricInvocationLatency(props?)
public metricInvocationLatency(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Return the invocation latency metric for this guardrail.
metricInvocationServerErrors(props?)
public metricInvocationServerErrors(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Return the invocation server errors metric for this guardrail.
metricInvocationThrottles(props?)
public metricInvocationThrottles(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Return the invocation throttles metric for this guardrail.
metricInvocations(props?)
public metricInvocations(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Return the invocations metric for this guardrail.
metricInvocationsIntervened(props?)
public metricInvocationsIntervened(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Return the invocations intervened metric for this guardrail.
metricTextUnitCount(props?)
public metricTextUnitCount(props?: MetricOptions): Metric
Parameters
- props
Metric
Options
Returns
Return the text unit count metric for this guardrail.