|
| 1 | +[@cdklabs/generative-ai-cdk-constructs](../README.md) / [bedrock](../modules/bedrock.md) / ContentPolicyConfig |
| 2 | + |
| 3 | +# Class: ContentPolicyConfig |
| 4 | + |
| 5 | +[bedrock](../modules/bedrock.md).ContentPolicyConfig |
| 6 | + |
| 7 | +## Hierarchy |
| 8 | + |
| 9 | +- `Construct` |
| 10 | + |
| 11 | + ↳ **`ContentPolicyConfig`** |
| 12 | + |
| 13 | +## Table of contents |
| 14 | + |
| 15 | +### Constructors |
| 16 | + |
| 17 | +- [constructor](bedrock.ContentPolicyConfig.md#constructor) |
| 18 | + |
| 19 | +### Properties |
| 20 | + |
| 21 | +- [contentPolicyConfigList](bedrock.ContentPolicyConfig.md#contentpolicyconfiglist) |
| 22 | +- [node](bedrock.ContentPolicyConfig.md#node) |
| 23 | + |
| 24 | +### Methods |
| 25 | + |
| 26 | +- [createContentFilterConfig](bedrock.ContentPolicyConfig.md#createcontentfilterconfig) |
| 27 | +- [createContentPolicyConfigList](bedrock.ContentPolicyConfig.md#createcontentpolicyconfiglist) |
| 28 | +- [toString](bedrock.ContentPolicyConfig.md#tostring) |
| 29 | +- [isConstruct](bedrock.ContentPolicyConfig.md#isconstruct) |
| 30 | + |
| 31 | +## Constructors |
| 32 | + |
| 33 | +### constructor |
| 34 | + |
| 35 | +• **new ContentPolicyConfig**(`scope`, `id`, `props?`): [`ContentPolicyConfig`](bedrock.ContentPolicyConfig.md) |
| 36 | + |
| 37 | +#### Parameters |
| 38 | + |
| 39 | +| Name | Type | |
| 40 | +| :------ | :------ | |
| 41 | +| `scope` | `Construct` | |
| 42 | +| `id` | `string` | |
| 43 | +| `props?` | [`ContentPolicyConfigProps`](../interfaces/bedrock.ContentPolicyConfigProps.md)[] | |
| 44 | + |
| 45 | +#### Returns |
| 46 | + |
| 47 | +[`ContentPolicyConfig`](bedrock.ContentPolicyConfig.md) |
| 48 | + |
| 49 | +#### Overrides |
| 50 | + |
| 51 | +Construct.constructor |
| 52 | + |
| 53 | +## Properties |
| 54 | + |
| 55 | +### contentPolicyConfigList |
| 56 | + |
| 57 | +• `Readonly` **contentPolicyConfigList**: `ContentFilterConfigProperty`[] |
| 58 | + |
| 59 | +___ |
| 60 | + |
| 61 | +### node |
| 62 | + |
| 63 | +• `Readonly` **node**: `Node` |
| 64 | + |
| 65 | +The tree node. |
| 66 | + |
| 67 | +#### Inherited from |
| 68 | + |
| 69 | +Construct.node |
| 70 | + |
| 71 | +## Methods |
| 72 | + |
| 73 | +### createContentFilterConfig |
| 74 | + |
| 75 | +▸ **createContentFilterConfig**(`prop`): `ContentFilterConfigProperty` |
| 76 | + |
| 77 | +#### Parameters |
| 78 | + |
| 79 | +| Name | Type | |
| 80 | +| :------ | :------ | |
| 81 | +| `prop` | [`ContentPolicyConfigProps`](../interfaces/bedrock.ContentPolicyConfigProps.md) | |
| 82 | + |
| 83 | +#### Returns |
| 84 | + |
| 85 | +`ContentFilterConfigProperty` |
| 86 | + |
| 87 | +___ |
| 88 | + |
| 89 | +### createContentPolicyConfigList |
| 90 | + |
| 91 | +▸ **createContentPolicyConfigList**(`props?`): `ContentFilterConfigProperty`[] |
| 92 | + |
| 93 | +#### Parameters |
| 94 | + |
| 95 | +| Name | Type | |
| 96 | +| :------ | :------ | |
| 97 | +| `props?` | [`ContentPolicyConfigProps`](../interfaces/bedrock.ContentPolicyConfigProps.md)[] | |
| 98 | + |
| 99 | +#### Returns |
| 100 | + |
| 101 | +`ContentFilterConfigProperty`[] |
| 102 | + |
| 103 | +___ |
| 104 | + |
| 105 | +### toString |
| 106 | + |
| 107 | +▸ **toString**(): `string` |
| 108 | + |
| 109 | +Returns a string representation of this construct. |
| 110 | + |
| 111 | +#### Returns |
| 112 | + |
| 113 | +`string` |
| 114 | + |
| 115 | +#### Inherited from |
| 116 | + |
| 117 | +Construct.toString |
| 118 | + |
| 119 | +___ |
| 120 | + |
| 121 | +### isConstruct |
| 122 | + |
| 123 | +▸ **isConstruct**(`x`): x is Construct |
| 124 | + |
| 125 | +Checks if `x` is a construct. |
| 126 | + |
| 127 | +Use this method instead of `instanceof` to properly detect `Construct` |
| 128 | +instances, even when the construct library is symlinked. |
| 129 | + |
| 130 | +Explanation: in JavaScript, multiple copies of the `constructs` library on |
| 131 | +disk are seen as independent, completely different libraries. As a |
| 132 | +consequence, the class `Construct` in each copy of the `constructs` library |
| 133 | +is seen as a different class, and an instance of one class will not test as |
| 134 | +`instanceof` the other class. `npm install` will not create installations |
| 135 | +like this, but users may manually symlink construct libraries together or |
| 136 | +use a monorepo tool: in those cases, multiple copies of the `constructs` |
| 137 | +library can be accidentally installed, and `instanceof` will behave |
| 138 | +unpredictably. It is safest to avoid using `instanceof`, and using |
| 139 | +this type-testing method instead. |
| 140 | + |
| 141 | +#### Parameters |
| 142 | + |
| 143 | +| Name | Type | Description | |
| 144 | +| :------ | :------ | :------ | |
| 145 | +| `x` | `any` | Any object | |
| 146 | + |
| 147 | +#### Returns |
| 148 | + |
| 149 | +x is Construct |
| 150 | + |
| 151 | +true if `x` is an object created from a class which extends `Construct`. |
| 152 | + |
| 153 | +#### Inherited from |
| 154 | + |
| 155 | +Construct.isConstruct |
0 commit comments