• 沒有找到結果。

See Also

在文檔中 CloudWatch RUM (頁 22-35)

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

ListTagsForResource

ListTagsForResource

Displays the tags associated with a CloudWatch RUM resource.

Request Syntax

GET /tags/ResourceArn HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

ResourceArn (p. 18)

The ARN of the resource that you want to see the tags of.

Pattern: arn:[^:]*:[^:]*:[^:]*:[^:]*:.*

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

Content-type: application/json { "ResourceArn": "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.

ResourceArn (p. 18)

The ARN of the resource that you are viewing.

Type: String

Pattern: arn:[^:]*:[^:]*:[^:]*:[^:]*:.*

Tags (p. 18)

The list of tag keys and values associated with the resource you specified.

Errors

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Errors

For information about the errors that are common to all actions, see Common Errors (p. 48).

InternalServerException Internal service exception.

HTTP Status Code: 500 ResourceNotFoundException

Resource not found.

HTTP Status Code: 404 ValidationException

One of the arguments for the request is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

PutRumEvents

PutRumEvents

Sends telemetry events about your application performance and user behavior to CloudWatch RUM. The code snippet that RUM generates for you to add to your application includes PutRumEvents operations to send this data to RUM.

Each PutRumEvents operation can send a batch of events from one user session.

Request Syntax

POST /appmonitors/Id/ HTTP/1.1 Content-type: application/json {

"AppMonitorDetails": { "id": "string", "name": "string", "version": "string"

},

"BatchId": "string", "RumEvents": [

URI Request Parameters

The request uses the following URI parameters.

Id (p. 20)

The ID of the app monitor that is sending this data.

Length Constraints: Fixed length of 36.

Pattern: ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$

Required: Yes

Request Body

The request accepts the following data in JSON format.

AppMonitorDetails (p. 20)

A structure that contains information about the app monitor that collected this telemetry information.

Response Syntax

Type: AppMonitorDetails (p. 37) object Required: Yes

BatchId (p. 20)

A unique identifier for this batch of RUM event data.

Type: String Required: Yes RumEvents (p. 20)

An array of structures that contain the telemetry event data.

Type: Array of RumEvent (p. 43) objects Required: Yes

UserDetails (p. 20)

A structure that contains information about the user session that this batch of events was collected from.

Type: UserDetails (p. 45) object Required: Yes

Response Syntax

HTTP/1.1 200

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 (p. 48).

AccessDeniedException

You don't have sufficient permissions to perform this action.

HTTP Status Code: 403 InternalServerException

Internal service exception.

HTTP Status Code: 500 ResourceNotFoundException

Resource not found.

HTTP Status Code: 404 ThrottlingException

The request was throttled because of quota limits.

See Also

HTTP Status Code: 429 ValidationException

One of the arguments for the request is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

TagResource

TagResource

Assigns one or more tags (key-value pairs) to the specified CloudWatch RUM resource. Currently, the only resources that can be tagged app monitors.

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.

Tags don't have any semantic meaning to AWS and are interpreted strictly as strings of characters.

You can use the TagResource action with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag.

You can associate as many as 50 tags with a resource.

For more information, see Tagging AWS resources.

Request Syntax

POST /tags/ResourceArn HTTP/1.1 Content-type: application/json {

"Tags": {

"string" : "string"

}}

URI Request Parameters

The request uses the following URI parameters.

ResourceArn (p. 23)

The ARN of the CloudWatch RUM resource that you're adding tags to.

Pattern: arn:[^:]*:[^:]*:[^:]*:[^:]*:.*

Required: Yes

Request Body

The request accepts the following data in JSON format.

Tags (p. 23)

The list of key-value pairs to associate with the resource.

Type: String to string map

Key Length Constraints: Minimum length of 1. Maximum length of 128.

Key Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Response Syntax

Value Length Constraints: Minimum length of 0. Maximum length of 256.

Required: Yes

Response Syntax

HTTP/1.1 200

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 (p. 48).

InternalServerException Internal service exception.

HTTP Status Code: 500 ResourceNotFoundException

Resource not found.

HTTP Status Code: 404 ValidationException

One of the arguments for the request is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

UntagResource

UntagResource

Removes one or more tags from the specified resource.

Request Syntax

DELETE /tags/ResourceArn?tagKeys=TagKeys HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.

ResourceArn (p. 25)

The ARN of the CloudWatch RUM resource that you're removing tags from.

Pattern: arn:[^:]*:[^:]*:[^:]*:[^:]*:.*

Required: Yes TagKeys (p. 25)

The list of tag keys to remove from the resource.

Array Members: Minimum number of 0 items. Maximum number of 50 items.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: ^(?!aws:)[a-zA-Z+-=._:/]+$

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200

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 (p. 48).

InternalServerException Internal service exception.

HTTP Status Code: 500

See Also

ResourceNotFoundException Resource not found.

HTTP Status Code: 404 ValidationException

One of the arguments for the request is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

UpdateAppMonitor

UpdateAppMonitor

Updates the configuration of an existing app monitor. When you use this operation, only the parts of the app monitor configuration that you specify in this operation are changed. For any parameters that you omit, the existing values are kept.

You can't use this operation to change the tags of an existing app monitor. To change the tags of an existing app monitor, use TagResource.

To create a new app monitor, use CreateAppMonitor.

After you update an app monitor, sign in to the CloudWatch RUM console to get the updated JavaScript code snippet to add to your web application. For more information, see How do I find a code snippet that I've already generated?

Request Syntax

PATCH /appmonitor/Name HTTP/1.1 Content-type: application/json { "AppMonitorConfiguration": { "AllowCookies": boolean, "EnableXRay": boolean,

"ExcludedPages": [ "string" ], "FavoritePages": [ "string" ], "GuestRoleArn": "string", "IdentityPoolId": "string", "IncludedPages": [ "string" ], "SessionSampleRate": number, "Telemetries": [ "string" ] },

"CwLogEnabled": boolean, "Domain": "string"

}

URI Request Parameters

The request uses the following URI parameters.

Name (p. 27)

The name of the app monitor to update.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: ^(?!\.)[\.\-_#A-Za-z0-9]+$

Required: Yes

Request Body

The request accepts the following data in JSON format.

AppMonitorConfiguration (p. 27)

A structure that contains much of the configuration data for the app monitor. If you are using Amazon Cognito for authorization, you must include this structure in your request, and it must

Response Syntax

include the ID of the Amazon Cognito identity pool to use for authorization. If you don't include AppMonitorConfiguration, you must set up your own authorization method. For more information, see Authorize your application to send data to AWS.

Type: AppMonitorConfiguration (p. 34) object Required: No

CwLogEnabled (p. 27)

Data collected by RUM is kept by RUM for 30 days and then deleted. This parameter specifies whether RUM sends a copy of this telemetry data to Amazon CloudWatch Logs in your account.

This enables you to keep the telemetry data for more than 30 days, but it does incur Amazon CloudWatch Logs charges.

Type: Boolean Required: No Domain (p. 27)

The top-level internet domain name for which your application has administrative authority.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 253.

Pattern: ^(localhost)|^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|

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 (p. 48).

AccessDeniedException

You don't have sufficient permissions to perform this action.

HTTP Status Code: 403 ConflictException

This operation attempted to create a resource that already exists.

HTTP Status Code: 409

See Also

InternalServerException Internal service exception.

HTTP Status Code: 500 ResourceNotFoundException

Resource not found.

HTTP Status Code: 404 ThrottlingException

The request was throttled because of quota limits.

HTTP Status Code: 429 ValidationException

One of the arguments for the request is not valid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

• AWS SDK for .NET

• AWS SDK for C++

• AWS SDK for Go

• AWS SDK for Java V2

• AWS SDK for JavaScript

• AWS SDK for PHP V3

• AWS SDK for Python

• AWS SDK for Ruby V3

在文檔中 CloudWatch RUM (頁 22-35)

相關文件