Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Creates or updates the resource policy that grants permissions to source accounts to link to the monitoring account sink. When you create a sink policy, you can grant permissions to all accounts in an organization or to individual accounts.
You can also use a sink policy to limit the types of data that is shared. The three types that you can allow or deny are:
- Metrics - Specify with
AWS::CloudWatch::Metric
- Log groups - Specify with
AWS::Logs::LogGroup
- Traces - Specify with
AWS::XRay::Trace
See the examples in this section to see how to specify permitted source accounts and data types.
Synopsis
- data PutSinkPolicy = PutSinkPolicy' {
- sinkIdentifier :: Text
- policy :: Text
- newPutSinkPolicy :: Text -> Text -> PutSinkPolicy
- putSinkPolicy_sinkIdentifier :: Lens' PutSinkPolicy Text
- putSinkPolicy_policy :: Lens' PutSinkPolicy Text
- data PutSinkPolicyResponse = PutSinkPolicyResponse' {}
- newPutSinkPolicyResponse :: Int -> PutSinkPolicyResponse
- putSinkPolicyResponse_policy :: Lens' PutSinkPolicyResponse (Maybe Text)
- putSinkPolicyResponse_sinkArn :: Lens' PutSinkPolicyResponse (Maybe Text)
- putSinkPolicyResponse_sinkId :: Lens' PutSinkPolicyResponse (Maybe Text)
- putSinkPolicyResponse_httpStatus :: Lens' PutSinkPolicyResponse Int
Creating a Request
data PutSinkPolicy Source #
See: newPutSinkPolicy
smart constructor.
PutSinkPolicy' | |
|
Instances
Create a value of PutSinkPolicy
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:sinkIdentifier:PutSinkPolicy'
, putSinkPolicy_sinkIdentifier
- The ARN of the sink to attach this policy to.
PutSinkPolicy
, putSinkPolicy_policy
- The JSON policy to use. If you are updating an existing policy, the
entire existing policy is replaced by what you specify here.
The policy must be in JSON string format with quotation marks escaped and no newlines.
For examples of different types of policies, see the Examples section on this page.
Request Lenses
putSinkPolicy_sinkIdentifier :: Lens' PutSinkPolicy Text Source #
The ARN of the sink to attach this policy to.
putSinkPolicy_policy :: Lens' PutSinkPolicy Text Source #
The JSON policy to use. If you are updating an existing policy, the entire existing policy is replaced by what you specify here.
The policy must be in JSON string format with quotation marks escaped and no newlines.
For examples of different types of policies, see the Examples section on this page.
Destructuring the Response
data PutSinkPolicyResponse Source #
See: newPutSinkPolicyResponse
smart constructor.
Instances
newPutSinkPolicyResponse Source #
Create a value of PutSinkPolicyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
PutSinkPolicy
, putSinkPolicyResponse_policy
- The policy that you specified.
PutSinkPolicyResponse
, putSinkPolicyResponse_sinkArn
- The ARN of the sink.
$sel:sinkId:PutSinkPolicyResponse'
, putSinkPolicyResponse_sinkId
- The random ID string that Amazon Web Services generated as part of the
sink ARN.
$sel:httpStatus:PutSinkPolicyResponse'
, putSinkPolicyResponse_httpStatus
- The response's http status code.
Response Lenses
putSinkPolicyResponse_policy :: Lens' PutSinkPolicyResponse (Maybe Text) Source #
The policy that you specified.
putSinkPolicyResponse_sinkArn :: Lens' PutSinkPolicyResponse (Maybe Text) Source #
The ARN of the sink.
putSinkPolicyResponse_sinkId :: Lens' PutSinkPolicyResponse (Maybe Text) Source #
The random ID string that Amazon Web Services generated as part of the sink ARN.
putSinkPolicyResponse_httpStatus :: Lens' PutSinkPolicyResponse Int Source #
The response's http status code.