Skip to content
v2.278.0

Experimental

@aws-cdk/aws-bedrock-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

IGuardrail ​

Interface Experimental

Represents a Guardrail, either created with CDK or imported.

Properties ​

The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

guardrailArnstringguardrail_arnstrguardrailArnStringGuardrailArnstringGuardrailArn*string #
The ARN of the guardrail.
guardrailIdstringguardrail_idstrguardrailIdStringGuardrailIdstringGuardrailId*string #
The ID of the guardrail.
guardrailVersionstringguardrail_versionstrguardrailVersionStringGuardrailVersionstringGuardrailVersion*string #
The version of the guardrail.

If no explicit version is created, this will default to "DRAFT"

kmsKeymay be undefinedIKeykms_keymay be undefinedIKeykmsKeymay be undefinedIKeyKmsKeymay be undefinedIKeyKmsKeymay be undefinedIKey #
Optional KMS encryption key associated with this guardrail.
lastUpdatedmay be undefinedstringlast_updatedmay be undefinedstrlastUpdatedmay be undefinedStringLastUpdatedmay be undefinedstringLastUpdatedmay be undefined*string #
When this guardrail was last updated.
nodeNodenodeNodenodeNodeNodeNodeNodeNode #
The tree node.
stackStackstackStackstackStackStackStackStackStack #
The stack in which this resource is defined.

Methods ​

applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy) #
Apply the given removal policy to this resource.
notes

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: IGrantable, ...actions: string[]): Grantdef grant(self, grantee: IGrantable, actions: str) -> Grantpublic Grant grant(IGrantable grantee, String actions)public Grant Grant(IGrantable grantee, string actions)func Grant(Grantee IGrantable, Actions *string) Grant #
Grant the given principal identity permissions to perform actions on this guardrail.
grantApply(grantee: IGrantable): Grantdef grant_apply(self, grantee: IGrantable) -> Grantpublic Grant grantApply(IGrantable grantee)public Grant GrantApply(IGrantable grantee)func GrantApply(Grantee IGrantable) Grant #
Grant the given identity permissions to apply the guardrail.
metric(metricName: string, props?: MetricOptions): Metricdef metric(self, metric_name: str, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metric(String metricName, MetricOptions props)public Metric Metric(string metricName, MetricOptions? props = null)func Metric(MetricName *string, Props MetricOptions) Metric #
Return the given named metric for this guardrail.
metricInvocationClientErrors(props?: MetricOptions): Metricdef metric_invocation_client_errors(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricInvocationClientErrors(MetricOptions props)public Metric MetricInvocationClientErrors(MetricOptions? props = null)func MetricInvocationClientErrors(Props MetricOptions) Metric #
Return the invocation client errors metric for this guardrail.
metricInvocationLatency(props?: MetricOptions): Metricdef metric_invocation_latency(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricInvocationLatency(MetricOptions props)public Metric MetricInvocationLatency(MetricOptions? props = null)func MetricInvocationLatency(Props MetricOptions) Metric #
Return the invocation latency metric for this guardrail.
metricInvocations(props?: MetricOptions): Metricdef metric_invocations(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricInvocations(MetricOptions props)public Metric MetricInvocations(MetricOptions? props = null)func MetricInvocations(Props MetricOptions) Metric #
Return the invocations metric for this guardrail.
metricInvocationServerErrors(props?: MetricOptions): Metricdef metric_invocation_server_errors(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricInvocationServerErrors(MetricOptions props)public Metric MetricInvocationServerErrors(MetricOptions? props = null)func MetricInvocationServerErrors(Props MetricOptions) Metric #
Return the invocation server errors metric for this guardrail.
metricInvocationsIntervened(props?: MetricOptions): Metricdef metric_invocations_intervened(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricInvocationsIntervened(MetricOptions props)public Metric MetricInvocationsIntervened(MetricOptions? props = null)func MetricInvocationsIntervened(Props MetricOptions) Metric #
Return the invocations intervened metric for this guardrail.
metricInvocationThrottles(props?: MetricOptions): Metricdef metric_invocation_throttles(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricInvocationThrottles(MetricOptions props)public Metric MetricInvocationThrottles(MetricOptions? props = null)func MetricInvocationThrottles(Props MetricOptions) Metric #
Return the invocation throttles metric for this guardrail.
metricTextUnitCount(props?: MetricOptions): Metricdef metric_text_unit_count(self, props: typing.Optional[MetricOptions] = None) -> Metricpublic Metric metricTextUnitCount(MetricOptions props)public Metric MetricTextUnitCount(MetricOptions? props = null)func MetricTextUnitCount(Props MetricOptions) Metric #
Return the text unit count metric for this guardrail.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct #
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining