Smaws_Client_VerifiedPermissions.CreatePolicyCreates a Cedar policy and saves it in the specified policy store. You can create either a static policy or a policy linked to a policy template.
StaticPolicy section of the PolicyDefinition.templateLinked section of the PolicyDefinition. If the policy template is ever updated, any policies linked to the policy template automatically use the updated template.Creating a policy causes it to be validated against the schema in the policy store. If the policy doesn't pass validation, the operation fails and the policy isn't stored.
Verified Permissions is eventually consistent. It can take a few seconds for a new or changed element to propagate through the service and be visible in the results of other Verified Permissions operations.
val error_to_string :
[ Smaws_Lib.Protocols.AwsJson.error
| `ConflictException of Types.conflict_exception
| `ResourceNotFoundException of Types.resource_not_found_exception
| `ServiceQuotaExceededException of Types.service_quota_exceeded_exception ] ->
stringval request :
'http_type Smaws_Lib.Context.t ->
Types.create_policy_input ->
(Types.create_policy_output,
[> Smaws_Lib.Protocols.AwsJson.error
| `ConflictException of Types.conflict_exception
| `ResourceNotFoundException of Types.resource_not_found_exception
| `ServiceQuotaExceededException of Types.service_quota_exceeded_exception ])
Stdlib.resultval request_with_metadata :
'http_type Smaws_Lib.Context.t ->
Types.create_policy_input ->
(Types.create_policy_output Smaws_Lib.Response.t,
[> Smaws_Lib.Protocols.AwsJson.error
| `ConflictException of Types.conflict_exception
| `ResourceNotFoundException of Types.resource_not_found_exception
| `ServiceQuotaExceededException of Types.service_quota_exceeded_exception ]
* Smaws_Lib.Response.metadata)
Stdlib.result