CreateSink
Use this to create a sink in the current account, so that it can be used as a monitoring account in CloudWatch cross-account observability. A sink is a resource that represents an attachment point in a monitoring account. Source accounts can link to the sink to send observability data.
After you create a sink, you must create a sink policy that allows source accounts to attach to it. For more information, see PutSinkPolicy.
Each account can contain one sink per Region. If you delete a sink, you can then create a new one in that Region.
Request Syntax
POST /CreateSink HTTP/1.1
Content-type: application/json
{
"Name": "string
",
"Tags": {
"string
" : "string
"
}
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- Name
-
A name for the sink.
Type: String
Pattern:
^[a-zA-Z0-9_\.\-]{1,255}$
Required: Yes
- Tags
-
Assigns one or more tags (key-value pairs) to the link.
Tags can help you organize and categorize your resources. You can also use them to scope user permissions by granting a user permission to access or change only resources with certain tag values.
For more information about using tags to control access, see Controlling access to Amazon Web Services resources using tags.
Type: String to string map
Map Entries: Minimum number of 0 items. Maximum number of 50 items.
Key Length Constraints: Minimum length of 1. Maximum length of 128.
Value Length Constraints: Minimum length of 0. Maximum length of 256.
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"Arn": "string",
"Id": "string",
"Name": "string",
"Tags": {
"string" : "string"
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
Errors
For information about the errors that are common to all actions, see Common Errors.
- ConflictException
-
A resource was in an inconsistent state during an update or a deletion.
HTTP Status Code: 409
- InternalServiceFault
-
Unexpected error while processing the request. Retry the request.
HTTP Status Code: 500
- InvalidParameterException
-
A parameter is specified incorrectly.
HTTP Status Code: 400
- MissingRequiredParameterException
-
A required parameter is missing from the request.
HTTP Status Code: 400
- ServiceQuotaExceededException
-
The request would cause a service quota to be exceeded.
HTTP Status Code: 429
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: