Module Smaws_Client_Organizations.CreatePolicy

Creates a policy of a specified type that you can attach to a root, an organizational unit (OU), or an individual Amazon Web Services account.

For more information about policies and their use, see Managing Organizations policies.

If the request includes tags, then the requester must have the organizations:TagResource permission.

You can only call this operation from the management account or a member account that is a delegated administrator.

val error_to_string : [ Smaws_Lib.Protocols.AwsJson.error | `AccessDeniedException of Types.access_denied_exception | `AWSOrganizationsNotInUseException of Types.aws_organizations_not_in_use_exception | `ConcurrentModificationException of Types.concurrent_modification_exception | `ConstraintViolationException of Types.constraint_violation_exception | `DuplicatePolicyException of Types.duplicate_policy_exception | `InvalidInputException of Types.invalid_input_exception | `MalformedPolicyDocumentException of Types.malformed_policy_document_exception | `PolicyTypeNotAvailableForOrganizationException of Types.policy_type_not_available_for_organization_exception | `ServiceException of Types.service_exception | `TooManyRequestsException of Types.too_many_requests_exception | `UnsupportedAPIEndpointException of Types.unsupported_api_endpoint_exception ] -> string
val request : 'http_type Smaws_Lib.Context.t -> Types.create_policy_request -> (Types.create_policy_response, [> Smaws_Lib.Protocols.AwsJson.error | `AccessDeniedException of Types.access_denied_exception | `AWSOrganizationsNotInUseException of Types.aws_organizations_not_in_use_exception | `ConcurrentModificationException of Types.concurrent_modification_exception | `ConstraintViolationException of Types.constraint_violation_exception | `DuplicatePolicyException of Types.duplicate_policy_exception | `InvalidInputException of Types.invalid_input_exception | `MalformedPolicyDocumentException of Types.malformed_policy_document_exception | `PolicyTypeNotAvailableForOrganizationException of Types.policy_type_not_available_for_organization_exception | `ServiceException of Types.service_exception | `TooManyRequestsException of Types.too_many_requests_exception | `UnsupportedAPIEndpointException of Types.unsupported_api_endpoint_exception ]) Stdlib.result
val request_with_metadata : 'http_type Smaws_Lib.Context.t -> Types.create_policy_request -> (Types.create_policy_response Smaws_Lib.Response.t, [> Smaws_Lib.Protocols.AwsJson.error | `AccessDeniedException of Types.access_denied_exception | `AWSOrganizationsNotInUseException of Types.aws_organizations_not_in_use_exception | `ConcurrentModificationException of Types.concurrent_modification_exception | `ConstraintViolationException of Types.constraint_violation_exception | `DuplicatePolicyException of Types.duplicate_policy_exception | `InvalidInputException of Types.invalid_input_exception | `MalformedPolicyDocumentException of Types.malformed_policy_document_exception | `PolicyTypeNotAvailableForOrganizationException of Types.policy_type_not_available_for_organization_exception | `ServiceException of Types.service_exception | `TooManyRequestsException of Types.too_many_requests_exception | `UnsupportedAPIEndpointException of Types.unsupported_api_endpoint_exception ] * Smaws_Lib.Response.metadata) Stdlib.result