Specifies an Amazon Web Services rule that you want to share with another account, the account that you want to share the rule with, and the operations that you want the account to be able to perform on the rule.
Parameters:
-
arn
(Arn)
–
The Amazon Resource Name (ARN) of the rule that you want to share with another account.
-
resolver_rule_policy
(ResolverRulePolicy)
–
An Identity and Access Management policy statement that lists the rules that you want to share with another Amazon Web Services account and the operations that you want the account to be able to perform. You can specify the following operations in the Action section of the statement:
-
route53resolver:GetResolverRule
-
route53resolver:AssociateResolverRule
-
route53resolver:DisassociateResolverRule
-
route53resolver:ListResolverRules
-
route53resolver:ListResolverRuleAssociations
In the Resource section of the statement, specify the ARN for the rule that you want to share with another account. Specify the same ARN that you specified in Arn.
Raises:
Source code in docs_src/capo_route53resolver/_services/route53_resolver.py
| def put_resolver_rule_policy(
self,
arn: "capo_route53resolver.types.arn.Arn",
resolver_rule_policy: "capo_route53resolver.types.resolver_rule_policy.ResolverRulePolicy",
*,
config_overrides: Optional[Route53ResolverClientConfig] = None,
) -> "capo_route53resolver.types.put_resolver_rule_policy_response.PutResolverRulePolicyResponse":
"""<p>Specifies an Amazon Web Services rule that you want to share with another account, the account that you want to share the rule with, and the operations that you want the account to be able to perform on the rule.</p>
Args:
arn: <p>The Amazon Resource Name (ARN) of the rule that you want to share with another account.</p>
resolver_rule_policy: <p>An Identity and Access Management policy statement that lists the rules that you want to share with another Amazon Web Services account and the operations that you want the account to be able to perform. You can specify the following operations in the <code>Action</code> section of the statement:</p> <ul> <li> <p> <code>route53resolver:GetResolverRule</code> </p> </li> <li> <p> <code>route53resolver:AssociateResolverRule</code> </p> </li> <li> <p> <code>route53resolver:DisassociateResolverRule</code> </p> </li> <li> <p> <code>route53resolver:ListResolverRules</code> </p> </li> <li> <p> <code>route53resolver:ListResolverRuleAssociations</code> </p> </li> </ul> <p>In the <code>Resource</code> section of the statement, specify the ARN for the rule that you want to share with another account. Specify the same ARN that you specified in <code>Arn</code>.</p>
Raises:
capo_route53resolver.errors.access_denied_exception.AccessDeniedException: <p>The current account doesn't have the IAM permissions required to perform the specified Resolver operation.</p> <p>This error can also be thrown when a customer has reached the 5120 character limit for a resource policy for CloudWatch Logs.</p>
capo_route53resolver.errors.internal_service_error_exception.InternalServiceErrorException: <p>We encountered an unknown error. Try again in a few minutes.</p>
capo_route53resolver.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters in this request are not valid.</p>
capo_route53resolver.errors.invalid_policy_document.InvalidPolicyDocument: <p>The specified Resolver rule policy is invalid.</p>
capo_route53resolver.errors.unknown_resource_exception.UnknownResourceException: <p>The specified resource doesn't exist.</p>
capo_route53resolver.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_route53resolver.types.put_resolver_rule_policy_request.PutResolverRulePolicyRequest]",
) -> OperationResponse[
"capo_route53resolver.types.put_resolver_rule_policy_response.PutResolverRulePolicyResponse"
]:
import capo_route53resolver._operations.route53_resolver.put_resolver_rule_policy
output, http_response = (
capo_route53resolver._operations.route53_resolver.put_resolver_rule_policy.put_resolver_rule_policy(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutResolverRulePolicy")
)
input_: capo_route53resolver.types.put_resolver_rule_policy_request.PutResolverRulePolicyRequest = {
"arn": arn,
"resolver_rule_policy": resolver_rule_policy,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|