put_resource_policy
¶
put_resource_policy(
resource_arn: ResourceArn,
resource_policy: Policy,
client_token: IdempotenceToken,
*,
config_overrides: Optional[LookoutEquipmentClientConfig] = None,
policy_revision_id: Optional[PolicyRevisionId] = None,
) -> PutResourcePolicyResponse
Creates a resource control policy for a given resource.
Parameters:
-
resource_arn(ResourceArn) –The Amazon Resource Name (ARN) of the resource for which the policy is being created.
-
resource_policy(Policy) –The JSON-formatted resource policy to create.
-
policy_revision_id(Optional[PolicyRevisionId], default:None) –A unique identifier for a revision of the resource policy.
-
client_token(IdempotenceToken) –A unique identifier for the request. If you do not set the client request token, Amazon Lookout for Equipment generates one.
Raises:
-
AccessDeniedException–The request could not be completed because you do not have access to the resource.
-
ConflictException–The request could not be completed due to a conflict with the current state of the target resource.
-
InternalServerException–Processing of the request has failed because of an unknown error, exception or failure.
-
ResourceNotFoundException–The resource requested could not be found. Verify the resource ID and retry your request.
-
ServiceQuotaExceededException–Resource limitations have been exceeded.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input fails to satisfy constraints specified by Amazon Lookout for Equipment or a related Amazon Web Services service that's being utilized.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_lookoutequipment/_services/lookout_equipment.py
2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 | |