PutResourcePolicy
Creates or updates an IAM policy for your rule group or firewall policy. Use this to share rule groups and firewall policies between accounts. This operation works in conjunction with the AWS Resource Access Manager (RAM) service to manage resource sharing for Network Firewall.
Use this operation to create or update a resource policy for your rule group or firewall policy. In the policy, you specify the accounts that you want to share the resource with and the operations that you want the accounts to be able to perform.
When you add an account in the resource policy, you then run the following Resource Access Manager (RAM) operations to access and accept the shared rule group or firewall policy.
-
GetResourceShareInvitations - Returns the Amazon Resource Names (ARNs) of the resource share invitations.
-
AcceptResourceShareInvitation - Accepts the share invitation for a specified resource share.
For additional information about resource sharing using RAM, see AWS Resource Access Manager User Guide.
Request Syntax
{
"Policy": "string
",
"ResourceArn": "string
"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- Policy
-
The IAM policy statement that lists the accounts that you want to share your rule group or firewall policy with and the operations that you want the accounts to be able to perform.
For a rule group resource, you can specify the following operations in the Actions section of the statement:
-
network-firewall:CreateFirewallPolicy
-
network-firewall:UpdateFirewallPolicy
-
network-firewall:ListRuleGroups
For a firewall policy resource, you can specify the following operations in the Actions section of the statement:
-
network-firewall:AssociateFirewallPolicy
-
network-firewall:ListFirewallPolicies
In the Resource section of the statement, you specify the ARNs for the rule groups and firewall policies that you want to share with the account that you specified in
Arn
.Type: String
Length Constraints: Minimum length of 1. Maximum length of 395000.
Pattern:
.*\S.*
Required: Yes
-
- ResourceArn
-
The Amazon Resource Name (ARN) of the account that you want to share rule groups and firewall policies with.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
^arn:aws.*
Required: Yes
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServerError
-
Your request is valid, but Network Firewall couldn't perform the operation because of a system problem. Retry your request.
HTTP Status Code: 500
- InvalidRequestException
-
The operation failed because of a problem with your request. Examples include:
-
You specified an unsupported parameter name or value.
-
You tried to update a property with a value that isn't among the available types.
-
Your request references an ARN that is malformed, or corresponds to a resource that isn't valid in the context of the request.
HTTP Status Code: 400
-
- InvalidResourcePolicyException
-
The policy statement failed validation.
HTTP Status Code: 400
- ResourceNotFoundException
-
Unable to locate a resource using the parameters that you provided.
HTTP Status Code: 400
- ThrottlingException
-
Unable to process the request due to throttling limitations.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: