id
stringlengths 8
78
| source
stringclasses 743
values | chunk_id
int64 1
5.05k
| text
stringlengths 593
49.7k
|
---|---|---|---|
amazonsecuritylake-api-014 | amazonsecuritylake-api.pdf | 14 | host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2018-05-10 55 Amazon Security Lake See Also API Reference 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 56 Amazon Security Lake API Reference DeregisterDataLakeDelegatedAdministrator Deletes the Amazon Security Lake delegated administrator account for the organization. This API can only be called by the organization management account. The organization management account cannot be the delegated administrator account. Request Syntax DELETE /v1/datalake/delegate HTTP/1.1 URI Request Parameters The request does not use any URI parameters. 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. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 DeregisterDataLakeDelegatedAdministrator API Version 2018-05-10 57 Amazon Security Lake BadRequestException API Reference The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 See Also API Version 2018-05-10 58 Amazon Security Lake • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 59 Amazon Security Lake API Reference GetDataLakeExceptionSubscription Retrieves the protocol and endpoint that were provided when subscribing to Amazon SNS topics for exception notifications. Request Syntax GET /v1/datalake/exceptions/subscription HTTP/1.1 URI Request Parameters The request does not use any URI parameters. Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "exceptionTimeToLive": number, "notificationEndpoint": "string", "subscriptionProtocol": "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. exceptionTimeToLive The expiration period and time-to-live (TTL). It is the duration of time until which the exception message remains. Type: Long GetDataLakeExceptionSubscription API Version 2018-05-10 60 Amazon Security Lake notificationEndpoint API Reference The AWS account where you receive exception notifications. Type: String Pattern: ^[\\\w\-_:/.@=+]*$ subscriptionProtocol The subscription protocol to which exception notifications are posted. Type: String Pattern: ^[a-z\-]*$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException |
amazonsecuritylake-api-015 | amazonsecuritylake-api.pdf | 15 | about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 Errors API Version 2018-05-10 61 Amazon Security Lake InternalServerException API Reference Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 62 Amazon Security Lake API Reference GetDataLakeOrganizationConfiguration Retrieves the configuration that will be automatically set up for accounts added to the organization after the organization has onboarded to Amazon Security Lake. This API does not take input parameters. Request Syntax GET /v1/datalake/organization/configuration HTTP/1.1 URI Request Parameters The request does not use any URI parameters. Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "autoEnableNewAccount": [ { "region": "string", "sources": [ { "sourceName": "string", "sourceVersion": "string" } ] } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. GetDataLakeOrganizationConfiguration API Version 2018-05-10 63 Amazon Security Lake API Reference The following data is returned in JSON format by the service. autoEnableNewAccount The configuration used for new accounts in Security Lake. Type: Array of DataLakeAutoEnableNewAccountConfiguration objects Array Members: Minimum number of 1 item. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 Errors API Version 2018-05-10 64 Amazon Security Lake ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException API Reference The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 65 Amazon Security Lake API Reference GetDataLakeSources Retrieves a snapshot of the current Region, including whether Amazon Security Lake is enabled for those accounts and which sources Security Lake is collecting data from. Request Syntax POST /v1/datalake/sources HTTP/1.1 Content-type: application/json { "accounts": [ "string" ], "maxResults": number, "nextToken": "string" } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. accounts The AWS account ID for which |
amazonsecuritylake-api-016 | amazonsecuritylake-api.pdf | 16 | AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 65 Amazon Security Lake API Reference GetDataLakeSources Retrieves a snapshot of the current Region, including whether Amazon Security Lake is enabled for those accounts and which sources Security Lake is collecting data from. Request Syntax POST /v1/datalake/sources HTTP/1.1 Content-type: application/json { "accounts": [ "string" ], "maxResults": number, "nextToken": "string" } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. accounts The AWS account ID for which a static snapshot of the current AWS Region, including enabled accounts and log sources, is retrieved. Type: Array of strings Length Constraints: Fixed length of 12. Pattern: ^[0-9]{12}$ Required: No maxResults The maximum limit of accounts for which the static snapshot of the current Region, including enabled accounts and log sources, is retrieved. GetDataLakeSources API Version 2018-05-10 66 Amazon Security Lake Type: Integer Valid Range: Minimum value of 1. Maximum value of 100. API Reference Required: No nextToken Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error. Type: String Length Constraints: Minimum length of 0. Maximum length of 2048. Required: No Response Syntax HTTP/1.1 200 Content-type: application/json { "dataLakeArn": "string", "dataLakeSources": [ { "account": "string", "eventClasses": [ "string" ], "sourceName": "string", "sourceStatuses": [ { "resource": "string", "status": "string" } ] } ], "nextToken": "string" Response Syntax API Version 2018-05-10 67 Amazon Security Lake } Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. dataLakeArn The Amazon Resource Name (ARN) created by you to provide to the subscriber. For more information about ARNs and how to use them in policies, see the Amazon Security Lake User Guide. Type: String Length Constraints: Minimum length of 1. Maximum length of 1011. Pattern: ^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.\-]{0,63}: [A-Za-z0-9_/.\-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.\-]{0,127}$ dataLakeSources The list of enabled accounts and enabled sources. Type: Array of DataLakeSource objects nextToken Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error. Type: String Length Constraints: Minimum length of 0. Maximum length of 2048. Errors For information about the errors that are common to all actions, see Common Errors. Response Elements API Version 2018-05-10 68 Amazon Security Lake AccessDeniedException API Reference You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2018-05-10 69 Amazon Security Lake See Also API Reference 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 70 Amazon Security Lake GetSubscriber API Reference Retrieves the subscription information for the specified subscription ID. You can get information about a specific subscriber. Request Syntax GET /v1/subscribers/subscriberId HTTP/1.1 URI Request Parameters The request uses the following URI parameters. subscriberId A value created by Amazon Security Lake that uniquely identifies your GetSubscriber |
amazonsecuritylake-api-017 | amazonsecuritylake-api.pdf | 17 | SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 70 Amazon Security Lake GetSubscriber API Reference Retrieves the subscription information for the specified subscription ID. You can get information about a specific subscriber. Request Syntax GET /v1/subscribers/subscriberId HTTP/1.1 URI Request Parameters The request uses the following URI parameters. subscriberId A value created by Amazon Security Lake that uniquely identifies your GetSubscriber API request. Pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "subscriber": { "accessTypes": [ "string" ], "createdAt": "string", "resourceShareArn": "string", "resourceShareName": "string", "roleArn": "string", "s3BucketArn": "string", GetSubscriber API Version 2018-05-10 71 API Reference Amazon Security Lake "sources": [ { ... } ], "subscriberArn": "string", "subscriberDescription": "string", "subscriberEndpoint": "string", "subscriberId": "string", "subscriberIdentity": { "externalId": "string", "principal": "string" }, "subscriberName": "string", "subscriberStatus": "string", "updatedAt": "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. subscriber The subscriber information for the specified subscriber ID. Type: SubscriberResource object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 Response Elements API Version 2018-05-10 72 Amazon Security Lake BadRequestException API Reference The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 See Also API Version 2018-05-10 73 Amazon Security Lake • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 74 Amazon Security Lake API Reference ListDataLakeExceptions Lists the Amazon Security Lake exceptions that you can use to find the source of problems and fix them. Request Syntax POST /v1/datalake/exceptions HTTP/1.1 Content-type: application/json { "maxResults": number, "nextToken": "string", "regions": [ "string" ] } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. maxResults Lists the maximum number of failures in Security Lake. Type: Integer Valid Range: Minimum value of 1. Maximum value of 100. Required: No nextToken Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error. ListDataLakeExceptions API Version 2018-05-10 75 Amazon Security Lake Type: String API Reference Length Constraints: Minimum length of 0. Maximum length of 2048. Required: No regions The AWS Regions from which exceptions are retrieved. Type: Array of strings Pattern: ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Required: No Response Syntax HTTP/1.1 200 Content-type: application/json { "exceptions": [ { "exception": "string", "region": "string", "remediation": "string", "timestamp": "string" } ], "nextToken": "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. exceptions Lists the failures that cannot be retried. Response Syntax API Version 2018-05-10 76 Amazon Security Lake API Reference Type: Array of DataLakeException objects nextToken Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call |
amazonsecuritylake-api-018 | amazonsecuritylake-api.pdf | 18 | ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Required: No Response Syntax HTTP/1.1 200 Content-type: application/json { "exceptions": [ { "exception": "string", "region": "string", "remediation": "string", "timestamp": "string" } ], "nextToken": "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. exceptions Lists the failures that cannot be retried. Response Syntax API Version 2018-05-10 76 Amazon Security Lake API Reference Type: Array of DataLakeException objects nextToken Lists if there are more results available. The value of nextToken is a unique pagination token for each page. Repeat the call using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error. Type: String Length Constraints: Minimum length of 0. Maximum length of 2048. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 Errors API Version 2018-05-10 77 Amazon Security Lake InternalServerException API Reference Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 78 Amazon Security Lake ListDataLakes API Reference Retrieves the Amazon Security Lake configuration object for the specified AWS Regions. You can use this operation to determine whether Security Lake is enabled for a Region. Request Syntax GET /v1/datalakes?regions=regions HTTP/1.1 URI Request Parameters The request uses the following URI parameters. regions The list of Regions where Security Lake is enabled. Pattern: ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "dataLakes": [ { "createStatus": "string", "dataLakeArn": "string", "encryptionConfiguration": { "kmsKeyId": "string" }, "lifecycleConfiguration": { "expiration": { ListDataLakes API Version 2018-05-10 79 Amazon Security Lake API Reference "days": number }, "transitions": [ { "days": number, "storageClass": "string" } ] }, "region": "string", "replicationConfiguration": { "regions": [ "string" ], "roleArn": "string" }, "s3BucketArn": "string", "updateStatus": { "exception": { "code": "string", "reason": "string" }, "requestId": "string", "status": "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. dataLakes Retrieves the Security Lake configuration object. Type: Array of DataLakeResource objects Errors For information about the errors that are common to all actions, see Common Errors. Response Elements API Version 2018-05-10 80 Amazon Security Lake AccessDeniedException API Reference You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. |
amazonsecuritylake-api-019 | amazonsecuritylake-api.pdf | 19 | also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2018-05-10 81 Amazon Security Lake See Also API Reference 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 82 API Reference Amazon Security Lake ListLogSources Retrieves the log sources. Request Syntax POST /v1/datalake/logsources/list HTTP/1.1 Content-type: application/json { "accounts": [ "string" ], "maxResults": number, "nextToken": "string", "regions": [ "string" ], "sources": [ { ... } ] } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. accounts The list of AWS accounts for which log sources are displayed. Type: Array of strings Length Constraints: Fixed length of 12. Pattern: ^[0-9]{12}$ Required: No maxResults The maximum number of accounts for which the log sources are displayed. ListLogSources API Version 2018-05-10 83 Amazon Security Lake Type: Integer Valid Range: Minimum value of 1. Maximum value of 100. API Reference Required: No nextToken If nextToken is returned, there are more results available. You can repeat the call using the returned token to retrieve the next page. Type: String Length Constraints: Minimum length of 0. Maximum length of 2048. Required: No regions The list of Regions for which log sources are displayed. Type: Array of strings Pattern: ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Required: No sources The list of sources for which log sources are displayed. Type: Array of LogSourceResource objects Required: No Response Syntax HTTP/1.1 200 Content-type: application/json { "nextToken": "string", Response Syntax API Version 2018-05-10 84 Amazon Security Lake API Reference "sources": [ { "account": "string", "region": "string", "sources": [ { ... } ] } ] } 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. nextToken If nextToken is returned, there are more results available. You can repeat the call using the returned token to retrieve the next page. Type: String Length Constraints: Minimum length of 0. Maximum length of 2048. sources The list of log sources in your organization that send data to the data lake. Type: Array of LogSource objects Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. Response Elements API Version 2018-05-10 85 Amazon Security Lake HTTP Status Code: 403 BadRequestException API Reference The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ See Also API Version 2018-05-10 86 Amazon Security Lake • AWS SDK for Go v2 • AWS |
amazonsecuritylake-api-020 | amazonsecuritylake-api.pdf | 20 | InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ See Also API Version 2018-05-10 86 Amazon Security Lake • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 87 Amazon Security Lake ListSubscribers API Reference Lists all subscribers for the specific Amazon Security Lake account ID. You can retrieve a list of subscriptions associated with a specific organization or AWS account. Request Syntax GET /v1/subscribers?maxResults=maxResults&nextToken=nextToken HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum number of accounts for which the configuration is displayed. Valid Range: Minimum value of 1. Maximum value of 100. nextToken If nextToken is returned, there are more results available. You can repeat the call using the returned token to retrieve the next page. Length Constraints: Minimum length of 0. Maximum length of 2048. Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "nextToken": "string", "subscribers": [ { "accessTypes": [ "string" ], ListSubscribers API Version 2018-05-10 88 Amazon Security Lake API Reference "createdAt": "string", "resourceShareArn": "string", "resourceShareName": "string", "roleArn": "string", "s3BucketArn": "string", "sources": [ { ... } ], "subscriberArn": "string", "subscriberDescription": "string", "subscriberEndpoint": "string", "subscriberId": "string", "subscriberIdentity": { "externalId": "string", "principal": "string" }, "subscriberName": "string", "subscriberStatus": "string", "updatedAt": "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. nextToken If nextToken is returned, there are more results available. You can repeat the call using the returned token to retrieve the next page. Type: String Length Constraints: Minimum length of 0. Maximum length of 2048. subscribers The subscribers available for the specified Security Lake account ID. Type: Array of SubscriberResource objects Response Elements API Version 2018-05-10 89 Amazon Security Lake Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2018-05-10 90 Amazon Security Lake See Also API Reference 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 91 Amazon Security Lake API Reference ListTagsForResource Retrieves the tags (keys and values) that are associated with an Amazon Security Lake resource: a subscriber, or the data lake configuration for your AWS account in a particular AWS Region. Request Syntax GET /v1/tags/resourceArn HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceArn The Amazon Resource Name (ARN) of the Amazon Security Lake resource for which you want to retrieve the tags. Length Constraints: Minimum length of 1. Maximum length of 1011. Pattern: ^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.\-]{0,63}: [A-Za-z0-9_/.\-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.\-]{0,127}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: |
amazonsecuritylake-api-021 | amazonsecuritylake-api.pdf | 21 | Lake API Reference ListTagsForResource Retrieves the tags (keys and values) that are associated with an Amazon Security Lake resource: a subscriber, or the data lake configuration for your AWS account in a particular AWS Region. Request Syntax GET /v1/tags/resourceArn HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceArn The Amazon Resource Name (ARN) of the Amazon Security Lake resource for which you want to retrieve the tags. Length Constraints: Minimum length of 1. Maximum length of 1011. Pattern: ^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.\-]{0,63}: [A-Za-z0-9_/.\-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.\-]{0,127}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "tags": [ { "key": "string", "value": "string" } ListTagsForResource API Version 2018-05-10 92 Amazon Security Lake ] } Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. tags An array of objects, one for each tag (key and value) that’s associated with the Amazon Security Lake resource. Type: Array of Tag objects Array Members: Minimum number of 0 items. Maximum number of 50 items. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. Response Elements API Version 2018-05-10 93 Amazon Security Lake HTTP Status Code: 409 InternalServerException API Reference Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 94 Amazon Security Lake API Reference RegisterDataLakeDelegatedAdministrator Designates the Amazon Security Lake delegated administrator account for the organization. This API can only be called by the organization management account. The organization management account cannot be the delegated administrator account. Request Syntax POST /v1/datalake/delegate HTTP/1.1 Content-type: application/json { "accountId": "string" } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. accountId The AWS account ID of the Security Lake delegated administrator. Type: String Pattern: ^[\\\w\-_:/.@=+]*$ 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. RegisterDataLakeDelegatedAdministrator API Version 2018-05-10 95 Amazon Security Lake Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API |
amazonsecuritylake-api-022 | amazonsecuritylake-api.pdf | 22 | ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. HTTP Status Code: 429 Errors API Version 2018-05-10 96 Amazon Security Lake See Also API Reference 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 97 Amazon Security Lake TagResource API Reference Adds or updates one or more tags that are associated with an Amazon Security Lake resource: a subscriber, or the data lake configuration for your AWS account in a particular AWS Region. A tag is a label that you can define and associate with AWS resources. Each tag consists of a required tag key and an associated tag value. A tag key is a general label that acts as a category for a more specific tag value. A tag value acts as a descriptor for a tag key. Tags can help you identify, categorize, and manage resources in different ways, such as by owner, environment, or other criteria. For more information, see Tagging Amazon Security Lake resources in the Amazon Security Lake User Guide. Request Syntax POST /v1/tags/resourceArn HTTP/1.1 Content-type: application/json { "tags": [ { "key": "string", "value": "string" } ] } URI Request Parameters The request uses the following URI parameters. resourceArn The Amazon Resource Name (ARN) of the Amazon Security Lake resource to add or update the tags for. Length Constraints: Minimum length of 1. Maximum length of 1011. Pattern: ^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.\-]{0,63}: [A-Za-z0-9_/.\-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.\-]{0,127}$ Required: Yes TagResource API Version 2018-05-10 98 Amazon Security Lake Request Body The request accepts the following data in JSON format. tags API Reference An array of objects, one for each tag (key and value) to associate with the Amazon Security Lake resource. For each tag, you must specify both a tag key and a tag value. A tag value cannot be null, but it can be an empty string. Type: Array of Tag objects Array Members: Minimum number of 0 items. Maximum number of 50 items. 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. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. Request Body API Version 2018-05-10 99 Amazon Security Lake HTTP Status Code: 400 ConflictException API Reference Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin See Also API Version 2018-05-10 100 Amazon Security Lake • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 101 Amazon Security Lake UntagResource API Reference Removes |
amazonsecuritylake-api-023 | amazonsecuritylake-api.pdf | 23 | Code: 429 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin See Also API Version 2018-05-10 100 Amazon Security Lake • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 101 Amazon Security Lake UntagResource API Reference Removes one or more tags (keys and values) from an Amazon Security Lake resource: a subscriber, or the data lake configuration for your AWS account in a particular AWS Region. Request Syntax DELETE /v1/tags/resourceArn?tagKeys=tagKeys HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceArn The Amazon Resource Name (ARN) of the Amazon Security Lake resource to remove one or more tags from. Length Constraints: Minimum length of 1. Maximum length of 1011. Pattern: ^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.\-]{0,63}: [A-Za-z0-9_/.\-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.\-]{0,127}$ Required: Yes tagKeys A list of one or more tag keys. For each value in the list, specify the tag key for a tag to remove from the Amazon Security Lake resource. Array Members: Minimum number of 0 items. Maximum number of 50 items. Length Constraints: Minimum length of 1. Maximum length of 128. Required: Yes Request Body The request does not have a request body. UntagResource API Version 2018-05-10 102 Amazon Security Lake Response Syntax HTTP/1.1 200 Response Elements API Reference 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. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 Response Syntax API Version 2018-05-10 103 Amazon Security Lake ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException API Reference The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 104 Amazon Security Lake UpdateDataLake API Reference You can use UpdateDataLake to specify where to store your security data, how it should be encrypted at rest and for how long. You can add a Rollup Region to consolidate data from multiple AWS Regions, replace default encryption (SSE-S3) with Customer Manged Key, or specify transition and expiration actions through storage Lifecycle management. The UpdateDataLake API works as an "upsert" operation that performs an insert if the specified item or record does not exist, or an update if it already exists. Security Lake securely stores your data at rest using AWS encryption solutions. For more details, see Data protection in Amazon Security Lake. For example, omitting the key encryptionConfiguration from a Region that is included in an update call that currently uses KMS will leave that Region's KMS key in place, but specifying encryptionConfiguration: {kmsKeyId: 'S3_MANAGED_KEY'} for that same Region will reset the key to S3-managed. For more details about lifecycle management and how to update retention settings for one or more Regions after enabling Security Lake, see the Amazon Security Lake User Guide. Request Syntax PUT /v1/datalake HTTP/1.1 Content-type: application/json { "configurations": [ { "encryptionConfiguration": { "kmsKeyId": "string" }, "lifecycleConfiguration": { "expiration": { "days": number }, "transitions": [ { "days": number, "storageClass": "string" } ] }, "region": "string", UpdateDataLake API Version 2018-05-10 105 Amazon Security Lake API Reference "replicationConfiguration": { "regions": [ "string" ], "roleArn": |
amazonsecuritylake-api-024 | amazonsecuritylake-api.pdf | 24 | Region's KMS key in place, but specifying encryptionConfiguration: {kmsKeyId: 'S3_MANAGED_KEY'} for that same Region will reset the key to S3-managed. For more details about lifecycle management and how to update retention settings for one or more Regions after enabling Security Lake, see the Amazon Security Lake User Guide. Request Syntax PUT /v1/datalake HTTP/1.1 Content-type: application/json { "configurations": [ { "encryptionConfiguration": { "kmsKeyId": "string" }, "lifecycleConfiguration": { "expiration": { "days": number }, "transitions": [ { "days": number, "storageClass": "string" } ] }, "region": "string", UpdateDataLake API Version 2018-05-10 105 Amazon Security Lake API Reference "replicationConfiguration": { "regions": [ "string" ], "roleArn": "string" } } ], "metaStoreManagerRoleArn": "string" } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. configurations Specifies the Region or Regions that will contribute data to the rollup region. Type: Array of DataLakeConfiguration objects Array Members: Minimum number of 1 item. Required: Yes metaStoreManagerRoleArn The Amazon Resource Name (ARN) used to create and update the AWS Glue table. This table contains partitions generated by the ingestion and normalization of AWS log sources and custom sources. Type: String Pattern: ^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$ Required: No Response Syntax HTTP/1.1 200 Content-type: application/json URI Request Parameters API Version 2018-05-10 106 Amazon Security Lake API Reference { "dataLakes": [ { "createStatus": "string", "dataLakeArn": "string", "encryptionConfiguration": { "kmsKeyId": "string" }, "lifecycleConfiguration": { "expiration": { "days": number }, "transitions": [ { "days": number, "storageClass": "string" } ] }, "region": "string", "replicationConfiguration": { "regions": [ "string" ], "roleArn": "string" }, "s3BucketArn": "string", "updateStatus": { "exception": { "code": "string", "reason": "string" }, "requestId": "string", "status": "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. Response Elements API Version 2018-05-10 107 Amazon Security Lake dataLakes The created Security Lake configuration object. Type: Array of DataLakeResource objects Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. Errors API Version 2018-05-10 108 Amazon Security Lake HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was exceeded. API Reference HTTP Status Code: 429 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 109 Amazon Security Lake API Reference UpdateDataLakeExceptionSubscription Updates the specified notification subscription in Amazon Security Lake for the organization you specify. Request Syntax PUT /v1/datalake/exceptions/subscription HTTP/1.1 Content-type: application/json { "exceptionTimeToLive": number, "notificationEndpoint": "string", "subscriptionProtocol": "string" } URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. exceptionTimeToLive The time-to-live (TTL) for the exception message to remain. It is the duration of time until which the exception message remains. Type: Long Valid Range: Minimum value of 1. Required: No notificationEndpoint The account that is subscribed to receive exception notifications. Type: String UpdateDataLakeExceptionSubscription API Version 2018-05-10 110 Amazon Security Lake API Reference Pattern: ^[\\\w\-_:/.@=+]*$ Required: Yes subscriptionProtocol The subscription protocol to which exception messages are posted. Type: String Pattern: ^[a-z\-]*$ 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. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security |
amazonsecuritylake-api-025 | amazonsecuritylake-api.pdf | 25 | No notificationEndpoint The account that is subscribed to receive exception notifications. Type: String UpdateDataLakeExceptionSubscription API Version 2018-05-10 110 Amazon Security Lake API Reference Pattern: ^[\\\w\-_:/.@=+]*$ Required: Yes subscriptionProtocol The subscription protocol to which exception messages are posted. Type: String Pattern: ^[a-z\-]*$ 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. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 Response Syntax API Version 2018-05-10 111 Amazon Security Lake ConflictException API Reference Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 See Also API Version 2018-05-10 112 Amazon Security Lake • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 113 Amazon Security Lake UpdateSubscriber API Reference Updates an existing subscription for the given Amazon Security Lake account ID. You can update a subscriber by changing the sources that the subscriber consumes data from. Request Syntax PUT /v1/subscribers/subscriberId HTTP/1.1 Content-type: application/json { "sources": [ { ... } ], "subscriberDescription": "string", "subscriberIdentity": { "externalId": "string", "principal": "string" }, "subscriberName": "string" } URI Request Parameters The request uses the following URI parameters. subscriberId A value created by Security Lake that uniquely identifies your subscription. Pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$ Required: Yes Request Body The request accepts the following data in JSON format. UpdateSubscriber API Version 2018-05-10 114 Amazon Security Lake sources API Reference The supported AWS services from which logs and events are collected. For the list of supported AWS services, see the Amazon Security Lake User Guide. Type: Array of LogSourceResource objects Required: No subscriberDescription The description of the Security Lake account subscriber. Type: String Pattern: ^[\\\w\s\-_:/,.@=+]*$ Required: No subscriberIdentity The AWS identity used to access your data. Type: AwsIdentity object Required: No subscriberName The name of the Security Lake account subscriber. Type: String Length Constraints: Minimum length of 0. Maximum length of 64. Pattern: ^[\\\w\-_:/.@=+]*$ Required: No Response Syntax HTTP/1.1 200 Content-type: application/json { "subscriber": { Response Syntax API Version 2018-05-10 115 Amazon Security Lake API Reference "accessTypes": [ "string" ], "createdAt": "string", "resourceShareArn": "string", "resourceShareName": "string", "roleArn": "string", "s3BucketArn": "string", "sources": [ { ... } ], "subscriberArn": "string", "subscriberDescription": "string", "subscriberEndpoint": "string", "subscriberId": "string", "subscriberIdentity": { "externalId": "string", "principal": "string" }, "subscriberName": "string", "subscriberStatus": "string", "updatedAt": "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. subscriber The updated subscriber information. Type: SubscriberResource object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial Response Elements API Version 2018-05-10 116 Amazon Security Lake API Reference occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host |
amazonsecuritylake-api-026 | amazonsecuritylake-api.pdf | 26 | An explicit denial Response Elements API Version 2018-05-10 116 Amazon Security Lake API Reference occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 ConflictException Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was 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: • AWS Command Line Interface See Also API Version 2018-05-10 117 API Reference Amazon Security Lake • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2018-05-10 118 Amazon Security Lake API Reference UpdateSubscriberNotification Updates an existing notification method for the subscription (SQS or HTTPs endpoint) or switches the notification subscription endpoint for a subscriber. Request Syntax PUT /v1/subscribers/subscriberId/notification HTTP/1.1 Content-type: application/json { "configuration": { ... } } URI Request Parameters The request uses the following URI parameters. subscriberId The subscription ID for which the subscription notification is specified. Pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$ Required: Yes Request Body The request accepts the following data in JSON format. configuration The configuration for subscriber notification. Type: NotificationConfiguration object Note: This object is a Union. Only one member of this object can be specified or returned. Required: Yes UpdateSubscriberNotification API Version 2018-05-10 119 API Reference Amazon Security Lake Response Syntax HTTP/1.1 200 Content-type: application/json { "subscriberEndpoint": "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. subscriberEndpoint The subscriber endpoint to which exception messages are posted. Type: String Pattern: ^[\\\w\-_:/.@=+]*$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient access to perform this action. Access denied errors appear when Amazon Security Lake explicitly or implicitly denies an authorization request. An explicit denial occurs when a policy contains a Deny statement for the specific AWS action. An implicit denial occurs when there is no applicable Deny statement and also no applicable Allow statement. HTTP Status Code: 403 BadRequestException The request is malformed or contains an error such as an invalid parameter value or a missing required parameter. HTTP Status Code: 400 Response Syntax API Version 2018-05-10 120 Amazon Security Lake ConflictException API Reference Occurs when a conflict with a previous successful write is detected. This generally occurs when the previous write did not have time to propagate to the host serving the current request. A retry (with appropriate backoff logic) is the recommended response to this exception. HTTP Status Code: 409 InternalServerException Internal service exceptions are sometimes caused by transient issues. Before you start troubleshooting, perform the operation again. HTTP Status Code: 500 ResourceNotFoundException The resource could not be found. HTTP Status Code: 404 ThrottlingException The limit on the number of requests per second was 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: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 See Also API Version 2018-05-10 121 Amazon Security Lake • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 122 Amazon Security Lake Data Types API Reference The Amazon Security Lake API contains several data types that various actions use. This section describes each data type in detail. Note The order of each element in a data type structure is not guaranteed. Applications should not assume a particular order. The following data types are supported: • AwsIdentity • AwsLogSourceConfiguration • AwsLogSourceResource • CustomLogSourceAttributes • CustomLogSourceConfiguration • CustomLogSourceCrawlerConfiguration • CustomLogSourceProvider • CustomLogSourceResource • DataLakeAutoEnableNewAccountConfiguration |
amazonsecuritylake-api-027 | amazonsecuritylake-api.pdf | 27 | Also API Version 2018-05-10 121 Amazon Security Lake • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 122 Amazon Security Lake Data Types API Reference The Amazon Security Lake API contains several data types that various actions use. This section describes each data type in detail. Note The order of each element in a data type structure is not guaranteed. Applications should not assume a particular order. The following data types are supported: • AwsIdentity • AwsLogSourceConfiguration • AwsLogSourceResource • CustomLogSourceAttributes • CustomLogSourceConfiguration • CustomLogSourceCrawlerConfiguration • CustomLogSourceProvider • CustomLogSourceResource • DataLakeAutoEnableNewAccountConfiguration • DataLakeConfiguration • DataLakeEncryptionConfiguration • DataLakeException • DataLakeLifecycleConfiguration • DataLakeLifecycleExpiration • DataLakeLifecycleTransition • DataLakeReplicationConfiguration • DataLakeResource • DataLakeSource • DataLakeSourceStatus • DataLakeUpdateException API Version 2018-05-10 123 API Reference Amazon Security Lake • DataLakeUpdateStatus • HttpsNotificationConfiguration • LogSource • LogSourceResource • NotificationConfiguration • SqsNotificationConfiguration • SubscriberResource • Tag API Version 2018-05-10 124 Amazon Security Lake AwsIdentity The AWS identity. Contents externalId API Reference The external ID used to establish trust relationship with the AWS identity. Type: String Length Constraints: Minimum length of 2. Maximum length of 1224. Pattern: ^[\w+=,.@:\/-]*$ Required: Yes principal The AWS identity principal. Type: String Pattern: ^([0-9]{12}|[a-z0-9\.\-]*\.(amazonaws|amazon)\.com)$ Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 AwsIdentity API Version 2018-05-10 125 Amazon Security Lake API Reference AwsLogSourceConfiguration To add a natively-supported AWS service as a log source, use these parameters to specify the configuration settings for the log source. Contents regions Specify the Regions where you want to enable Security Lake. Type: Array of strings Pattern: ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Required: Yes sourceName The name for a AWS source. Type: String Valid Values: ROUTE53 | VPC_FLOW | SH_FINDINGS | CLOUD_TRAIL_MGMT | LAMBDA_EXECUTION | S3_DATA | EKS_AUDIT | WAF Required: Yes accounts Specify the AWS account information where you want to enable Security Lake. Type: Array of strings Length Constraints: Fixed length of 12. Pattern: ^[0-9]{12}$ Required: No sourceVersion The version for a AWS source. AwsLogSourceConfiguration API Version 2018-05-10 126 Amazon Security Lake Type: String Pattern: ^(latest|[0-9]\.[0-9])$ Required: No See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 See Also API Version 2018-05-10 127 Amazon Security Lake API Reference AwsLogSourceResource Amazon Security Lake can collect logs and events from natively-supported AWS services. Contents sourceName The name for a AWS source. This must be a Regionally unique value. Type: String Valid Values: ROUTE53 | VPC_FLOW | SH_FINDINGS | CLOUD_TRAIL_MGMT | LAMBDA_EXECUTION | S3_DATA | EKS_AUDIT | WAF Required: No sourceVersion The version for a AWS source. This must be a Regionally unique value. Type: String Pattern: ^(latest|[0-9]\.[0-9])$ Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 AwsLogSourceResource API Version 2018-05-10 128 Amazon Security Lake API Reference CustomLogSourceAttributes The attributes of a third-party custom source. Contents crawlerArn The ARN of the AWS Glue crawler. Type: String Length Constraints: Minimum length of 1. Maximum length of 1011. Pattern: ^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.\-]{0,63}: [A-Za-z0-9_/.\-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.\-]{0,127}$ Required: No databaseArn The ARN of the AWS Glue database where results are written, such as: arn:aws:daylight:us-east-1::database/sometable/*. Type: String Length Constraints: Minimum length of 1. Maximum length of 1011. Pattern: ^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.\-]{0,63}: [A-Za-z0-9_/.\-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.\-]{0,127}$ Required: No tableArn The ARN of the AWS Glue table. Type: String Length Constraints: Minimum length of 1. Maximum length of 1011. Pattern: ^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.\-]{0,63}: [A-Za-z0-9_/.\-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.\-]{0,127}$ CustomLogSourceAttributes API Version 2018-05-10 129 Amazon Security Lake Required: No See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 See Also API Version 2018-05-10 130 Amazon Security Lake API Reference CustomLogSourceConfiguration The configuration used for the third-party custom source. Contents crawlerConfiguration The configuration used for the Glue Crawler for a third-party custom source. Type: CustomLogSourceCrawlerConfiguration object Required: Yes providerIdentity The identity of the log provider for the third-party custom source. Type: AwsIdentity object Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 CustomLogSourceConfiguration API Version 2018-05-10 131 Amazon Security Lake API Reference CustomLogSourceCrawlerConfiguration The configuration used for the Glue Crawler for a third-party custom source. Contents roleArn The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role to |
amazonsecuritylake-api-028 | amazonsecuritylake-api.pdf | 28 | custom source. Type: CustomLogSourceCrawlerConfiguration object Required: Yes providerIdentity The identity of the log provider for the third-party custom source. Type: AwsIdentity object Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 CustomLogSourceConfiguration API Version 2018-05-10 131 Amazon Security Lake API Reference CustomLogSourceCrawlerConfiguration The configuration used for the Glue Crawler for a third-party custom source. Contents roleArn The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role to be used by the AWS Glue crawler. The recommended IAM policies are: • The managed policy AWSGlueServiceRole • A custom policy granting access to your Amazon S3 Data Lake Type: String Pattern: ^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$ Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 CustomLogSourceCrawlerConfiguration API Version 2018-05-10 132 Amazon Security Lake API Reference CustomLogSourceProvider The details of the log provider for a third-party custom source. Contents location The location of the partition in the Amazon S3 bucket for Security Lake. Type: String Length Constraints: Minimum length of 0. Maximum length of 1024. Pattern: ^s3[an]?://[a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9](/[^/].*)+$ Required: No roleArn The ARN of the IAM role to be used by the entity putting logs into your custom source partition. Security Lake will apply the correct access policies to this role, but you must first manually create the trust policy for this role. The IAM role name must start with the text 'Security Lake'. The IAM role must trust the logProviderAccountId to assume the role. Type: String Pattern: ^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$ Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 CustomLogSourceProvider API Version 2018-05-10 133 Amazon Security Lake API Reference CustomLogSourceResource Amazon Security Lake can collect logs and events from third-party custom sources. Contents attributes The attributes of a third-party custom source. Type: CustomLogSourceAttributes object Required: No provider The details of the log provider for a third-party custom source. Type: CustomLogSourceProvider object Required: No sourceName The name for a third-party custom source. This must be a Regionally unique value. Type: String Length Constraints: Minimum length of 1. Maximum length of 64. Pattern: ^[\w\-\_\:\.]*$ Required: No sourceVersion The version for a third-party custom source. This must be a Regionally unique value. Type: String Length Constraints: Minimum length of 1. Maximum length of 32. Pattern: ^[A-Za-z0-9\-\.\_]*$ Required: No CustomLogSourceResource API Version 2018-05-10 134 Amazon Security Lake See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 See Also API Version 2018-05-10 135 Amazon Security Lake API Reference DataLakeAutoEnableNewAccountConfiguration Automatically enable new organization accounts as member accounts from an Amazon Security Lake administrator account. Contents region The AWS Regions where Security Lake is automatically enabled. Type: String Pattern: ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Required: Yes sources The AWS sources that are automatically enabled in Security Lake. Type: Array of AwsLogSourceResource objects Array Members: Minimum number of 1 item. Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 DataLakeAutoEnableNewAccountConfiguration API Version 2018-05-10 136 Amazon Security Lake API Reference DataLakeConfiguration Provides details of Amazon Security Lake object. Contents region The AWS Regions where Security Lake is automatically enabled. Type: String Pattern: ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Required: Yes encryptionConfiguration Provides encryption details of Amazon Security Lake object. Type: DataLakeEncryptionConfiguration object Required: No lifecycleConfiguration Provides lifecycle details of Amazon Security Lake object. Type: DataLakeLifecycleConfiguration object Required: No replicationConfiguration Provides replication details of Amazon Security Lake object. Type: DataLakeReplicationConfiguration object Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: DataLakeConfiguration API Version 2018-05-10 137 Amazon Security Lake • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 138 Amazon Security Lake API Reference DataLakeEncryptionConfiguration Provides encryption details of Amazon Security Lake object. Contents kmsKeyId The identifier of KMS encryption key used by Amazon Security Lake to encrypt the Security Lake object. Type: String Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for |
amazonsecuritylake-api-029 | amazonsecuritylake-api.pdf | 29 | 137 Amazon Security Lake • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 138 Amazon Security Lake API Reference DataLakeEncryptionConfiguration Provides encryption details of Amazon Security Lake object. Contents kmsKeyId The identifier of KMS encryption key used by Amazon Security Lake to encrypt the Security Lake object. Type: String Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 DataLakeEncryptionConfiguration API Version 2018-05-10 139 API Reference Amazon Security Lake DataLakeException The details for an Amazon Security Lake exception. Contents exception The underlying exception of a Security Lake exception. Type: String Pattern: ^[\\\w\-_:/.@=+]*$ Required: No region The AWS Regions where the exception occurred. Type: String Pattern: ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Required: No remediation List of all remediation steps for a Security Lake exception. Type: String Pattern: ^[\\\w\-_:/.@=+]*$ Required: No timestamp This error can occur if you configure the wrong timestamp format, or if the subset of entries used for validation had errors or missing values. Type: Timestamp Required: No DataLakeException API Version 2018-05-10 140 Amazon Security Lake See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 See Also API Version 2018-05-10 141 Amazon Security Lake API Reference DataLakeLifecycleConfiguration Provides lifecycle details of Amazon Security Lake object. Contents expiration Provides data expiration details of Amazon Security Lake object. Type: DataLakeLifecycleExpiration object Required: No transitions Provides data storage transition details of Amazon Security Lake object. Type: Array of DataLakeLifecycleTransition objects Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 DataLakeLifecycleConfiguration API Version 2018-05-10 142 Amazon Security Lake API Reference DataLakeLifecycleExpiration Provide expiration lifecycle details of Amazon Security Lake object. Contents days Number of days before data expires in the Amazon Security Lake object. Type: Integer Valid Range: Minimum value of 1. Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 DataLakeLifecycleExpiration API Version 2018-05-10 143 Amazon Security Lake API Reference DataLakeLifecycleTransition Provide transition lifecycle details of Amazon Security Lake object. Contents days Number of days before data transitions to a different S3 Storage Class in the Amazon Security Lake object. Type: Integer Valid Range: Minimum value of 1. Required: No storageClass The range of storage classes that you can choose from based on the data access, resiliency, and cost requirements of your workloads. Type: String Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 DataLakeLifecycleTransition API Version 2018-05-10 144 Amazon Security Lake API Reference DataLakeReplicationConfiguration Provides replication details for objects stored in the Amazon Security Lake data lake. Contents regions Specifies one or more centralized rollup Regions. The AWS Region specified in the region parameter of the CreateDataLake or UpdateDataLake operations contributes data to the rollup Region or Regions specified in this parameter. Replication enables automatic, asynchronous copying of objects across Amazon S3 buckets. S3 buckets that are configured for object replication can be owned by the same AWS account or by different accounts. You can replicate objects to a single destination bucket or to multiple destination buckets. The destination buckets can be in different Regions or within the same Region as the source bucket. Type: Array of strings Pattern: ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Required: No roleArn Replication settings for the Amazon S3 buckets. This parameter uses the AWS Identity and Access Management (IAM) role you created that is managed by Security Lake, to ensure the replication setting is correct. Type: String Pattern: ^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$ Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: DataLakeReplicationConfiguration API Version 2018-05-10 145 Amazon Security Lake • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 146 Amazon Security Lake DataLakeResource Provides details of Amazon Security Lake object. Contents dataLakeArn API Reference The Amazon Resource Name (ARN) created by you to provide to the subscriber. For more information about ARNs and how to use them in policies, see the Amazon Security Lake User Guide. Type: String Length |
amazonsecuritylake-api-030 | amazonsecuritylake-api.pdf | 30 | For more information about using this API in one of the language-specific AWS SDKs, see the following: DataLakeReplicationConfiguration API Version 2018-05-10 145 Amazon Security Lake • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 146 Amazon Security Lake DataLakeResource Provides details of Amazon Security Lake object. Contents dataLakeArn API Reference The Amazon Resource Name (ARN) created by you to provide to the subscriber. For more information about ARNs and how to use them in policies, see the Amazon Security Lake User Guide. Type: String Length Constraints: Minimum length of 1. Maximum length of 1011. Pattern: ^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.\-]{0,63}: [A-Za-z0-9_/.\-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.\-]{0,127}$ Required: Yes region The AWS Regions where Security Lake is enabled. Type: String Pattern: ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Required: Yes createStatus Retrieves the status of the CreateDatalake API call for an account in Amazon Security Lake. Type: String Valid Values: INITIALIZED | PENDING | COMPLETED | FAILED Required: No encryptionConfiguration Provides encryption details of Amazon Security Lake object. DataLakeResource API Version 2018-05-10 147 Amazon Security Lake API Reference Type: DataLakeEncryptionConfiguration object Required: No lifecycleConfiguration Provides lifecycle details of Amazon Security Lake object. Type: DataLakeLifecycleConfiguration object Required: No replicationConfiguration Provides replication details of Amazon Security Lake object. Type: DataLakeReplicationConfiguration object Required: No s3BucketArn The ARN for the Amazon Security Lake Amazon S3 bucket. Type: String Required: No updateStatus The status of the last UpdateDataLake or DeleteDataLake API request. Type: DataLakeUpdateStatus object Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 See Also API Version 2018-05-10 148 Amazon Security Lake API Reference See Also API Version 2018-05-10 149 Amazon Security Lake DataLakeSource API Reference Amazon Security Lake collects logs and events from supported AWS services and custom sources. For the list of supported AWS services, see the Amazon Security Lake User Guide. Contents account The ID of the Security Lake account for which logs are collected. Type: String Required: No eventClasses The Open Cybersecurity Schema Framework (OCSF) event classes describes the type of data that the custom source will send to Security Lake. For the list of supported event classes, see Supported OCSF Event classes in the Amazon Security Lake User Guide. Type: Array of strings Pattern: ^[A-Z\_0-9]*$ Required: No sourceName The supported AWS services from which logs and events are collected. Amazon Security Lake supports log and event collection for natively supported AWS services. Type: String Required: No sourceStatuses The log status for the Security Lake account. Type: Array of DataLakeSourceStatus objects Required: No DataLakeSource API Version 2018-05-10 150 Amazon Security Lake See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 See Also API Version 2018-05-10 151 Amazon Security Lake API Reference DataLakeSourceStatus Retrieves the Logs status for the Amazon Security Lake account. Contents resource Defines path the stored logs are available which has information on your systems, applications, and services. Type: String Required: No status The health status of services, including error codes and patterns. Type: String Valid Values: COLLECTING | MISCONFIGURED | NOT_COLLECTING Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 DataLakeSourceStatus API Version 2018-05-10 152 Amazon Security Lake API Reference DataLakeUpdateException The details of the last UpdateDataLake or DeleteDataLake API request which failed. Contents code The reason code for the exception of the last UpdateDataLake or DeleteDataLake API request. Type: String Required: No reason The reason for the exception of the last UpdateDataLakeor DeleteDataLake API request. Type: String Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 DataLakeUpdateException API Version 2018-05-10 153 Amazon Security Lake API Reference DataLakeUpdateStatus The status of the last UpdateDataLake or DeleteDataLake API request. This is set to Completed after the configuration is updated, or removed if deletion of the data lake is successful. Contents exception The details of the last UpdateDataLakeor DeleteDataLake API request which failed. Type: DataLakeUpdateException object Required: No requestId The unique ID for the last UpdateDataLake or DeleteDataLake API request. Type: String Required: No status The status of the last UpdateDataLake or DeleteDataLake API request that was requested. Type: String Valid Values: INITIALIZED | PENDING | COMPLETED | FAILED Required: No See Also For more information about using this API in one of |
amazonsecuritylake-api-031 | amazonsecuritylake-api.pdf | 31 | the last UpdateDataLake or DeleteDataLake API request. This is set to Completed after the configuration is updated, or removed if deletion of the data lake is successful. Contents exception The details of the last UpdateDataLakeor DeleteDataLake API request which failed. Type: DataLakeUpdateException object Required: No requestId The unique ID for the last UpdateDataLake or DeleteDataLake API request. Type: String Required: No status The status of the last UpdateDataLake or DeleteDataLake API request that was requested. Type: String Valid Values: INITIALIZED | PENDING | COMPLETED | FAILED Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 DataLakeUpdateStatus API Version 2018-05-10 154 Amazon Security Lake API Reference See Also API Version 2018-05-10 155 Amazon Security Lake API Reference HttpsNotificationConfiguration The configurations used for HTTPS subscriber notification. Contents endpoint The subscription endpoint in Security Lake. If you prefer notification with an HTTPs endpoint, populate this field. Type: String Pattern: ^https?://.+$ Required: Yes targetRoleArn The Amazon Resource Name (ARN) of the EventBridge API destinations IAM role that you created. For more information about ARNs and how to use them in policies, see Managing data access and AWS Managed Policies in the Amazon Security Lake User Guide. Type: String Pattern: ^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$ Required: Yes authorizationApiKeyName The key name for the notification subscription. Type: String Required: No authorizationApiKeyValue The key value for the notification subscription. Type: String Required: No HttpsNotificationConfiguration API Version 2018-05-10 156 Amazon Security Lake httpMethod The HTTPS method used for the notification subscription. API Reference Type: String Valid Values: POST | PUT Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 See Also API Version 2018-05-10 157 Amazon Security Lake LogSource API Reference Amazon Security Lake can collect logs and events from natively-supported AWS services and custom sources. Contents account Specify the account from which you want to collect logs. Type: String Length Constraints: Fixed length of 12. Pattern: ^[0-9]{12}$ Required: No region Specify the Regions from which you want to collect logs. Type: String Pattern: ^(us(-gov)?|af|ap|ca|eu|me|sa)-(central|north|(north(?:east| west))|south|south(?:east|west)|east|west)-\d+$ Required: No sources Specify the sources from which you want to collect logs. Type: Array of LogSourceResource objects Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: LogSource API Version 2018-05-10 158 Amazon Security Lake • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 API Reference See Also API Version 2018-05-10 159 Amazon Security Lake LogSourceResource API Reference The supported source types from which logs and events are collected in Amazon Security Lake. For a list of supported AWS services, see the Amazon Security Lake User Guide. Contents Important This data type is a UNION, so only one of the following members can be specified when used or returned. awsLogSource Amazon Security Lake supports log and event collection for natively supported AWS services. For more information, see the Amazon Security Lake User Guide. Type: AwsLogSourceResource object Required: No customLogSource Amazon Security Lake supports custom source types. For more information, see the Amazon Security Lake User Guide. Type: CustomLogSourceResource object Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 LogSourceResource API Version 2018-05-10 160 Amazon Security Lake API Reference See Also API Version 2018-05-10 161 Amazon Security Lake API Reference NotificationConfiguration Specify the configurations you want to use for subscriber notification to notify the subscriber when new data is written to the data lake for sources that the subscriber consumes in Security Lake. Contents Important This data type is a UNION, so only one of the following members can be specified when used or returned. httpsNotificationConfiguration The configurations used for HTTPS subscriber notification. Type: HttpsNotificationConfiguration object Required: No sqsNotificationConfiguration The configurations for SQS subscriber notification. Type: SqsNotificationConfiguration object Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 NotificationConfiguration API Version 2018-05-10 162 Amazon Security Lake API Reference SqsNotificationConfiguration The configurations used for EventBridge subscriber notification. Contents The members of this exception structure are context-dependent. See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 SqsNotificationConfiguration |
amazonsecuritylake-api-032 | amazonsecuritylake-api.pdf | 32 | See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 NotificationConfiguration API Version 2018-05-10 162 Amazon Security Lake API Reference SqsNotificationConfiguration The configurations used for EventBridge subscriber notification. Contents The members of this exception structure are context-dependent. See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 SqsNotificationConfiguration API Version 2018-05-10 163 Amazon Security Lake SubscriberResource API Reference Provides details about the Amazon Security Lake account subscription. Subscribers are notified of new objects for a source as the data is written to your Amazon S3 bucket for Security Lake. Contents sources Amazon Security Lake supports log and event collection for natively supported AWS services. For more information, see the Amazon Security Lake User Guide. Type: Array of LogSourceResource objects Required: Yes subscriberArn The subscriber ARN of the Amazon Security Lake subscriber account. Type: String Length Constraints: Minimum length of 1. Maximum length of 1011. Pattern: ^arn:(aws|aws-us-gov|aws-cn):securitylake:[A-Za-z0-9_/.\-]{0,63}: [A-Za-z0-9_/.\-]{0,63}:[A-Za-z0-9][A-Za-z0-9_/.\-]{0,127}$ Required: Yes subscriberId The subscriber ID of the Amazon Security Lake subscriber account. Type: String Pattern: ^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$ Required: Yes subscriberIdentity The AWS identity used to access your data. Type: AwsIdentity object SubscriberResource API Version 2018-05-10 164 API Reference Amazon Security Lake Required: Yes subscriberName The name of your Amazon Security Lake subscriber account. Type: String Pattern: ^[\\\w\-_:/.@=+]*$ Required: Yes accessTypes You can choose to notify subscribers of new objects with an Amazon Simple Queue Service (Amazon SQS) queue or through messaging to an HTTPS endpoint provided by the subscriber. Subscribers can consume data by directly querying AWS Lake Formation tables in your Amazon S3 bucket through services like Amazon Athena. This subscription type is defined as LAKEFORMATION. Type: Array of strings Valid Values: LAKEFORMATION | S3 Required: No createdAt The date and time when the subscriber was created. Type: Timestamp Required: No resourceShareArn The Amazon Resource Name (ARN) which uniquely defines the AWS RAM resource share. Before accepting the RAM resource share invitation, you can view details related to the RAM resource share. This field is available only for Lake Formation subscribers created after March 8, 2023. Type: String Required: No Contents API Version 2018-05-10 165 Amazon Security Lake resourceShareName The name of the resource share. Type: String API Reference Pattern: ^LakeFormation(?:-V[0-9]+)-([a-zA-Z0-9]+)-([\\\w\-_:/.@=+]*)$ Required: No roleArn The Amazon Resource Name (ARN) specifying the role of the subscriber. Type: String Pattern: ^arn:(aws[a-zA-Z-]*)?:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+$ Required: No s3BucketArn The ARN for the Amazon S3 bucket. Type: String Required: No subscriberDescription The subscriber descriptions for a subscriber account. The description for a subscriber includes subscriberName, accountID, externalID, and subscriberId. Type: String Pattern: ^[\\\w\-_:/.@=+]*$ Required: No subscriberEndpoint The subscriber endpoint to which exception messages are posted. Type: String Pattern: ^[\\\w\-_:/.@=+]*$ Contents API Version 2018-05-10 166 API Reference Amazon Security Lake Required: No subscriberStatus The subscriber status of the Amazon Security Lake subscriber account. Type: String Valid Values: ACTIVE | DEACTIVATED | PENDING | READY Required: No updatedAt The date and time when the subscriber was last updated. Type: Timestamp Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 See Also API Version 2018-05-10 167 Amazon Security Lake Tag API Reference A tag is a label that you can define and associate with AWS resources, including certain types of Amazon Security Lake resources. Tags can help you identify, categorize, and manage resources in different ways, such as by owner, environment, or other criteria. You can associate tags with the following types of Security Lake resources: subscribers, and the data lake configuration for your AWS account in individual AWS Regions. A resource can have up to 50 tags. Each tag consists of a required tag key and an associated tag value. A tag key is a general label that acts as a category for a more specific tag value. Each tag key must be unique and it can have only one tag value. A tag value acts as a descriptor for a tag key. Tag keys and values are case sensitive. They can contain letters, numbers, spaces, or the following symbols: _ . : / = + @ - For more information, see Tagging Amazon Security Lake resources in the Amazon Security Lake User Guide. Contents key The name of the tag. This is a general label that acts as a category for a more specific tag value (value). Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Required: Yes value The value that’s associated with the specified |
amazonsecuritylake-api-033 | amazonsecuritylake-api.pdf | 33 | tag value. A tag value acts as a descriptor for a tag key. Tag keys and values are case sensitive. They can contain letters, numbers, spaces, or the following symbols: _ . : / = + @ - For more information, see Tagging Amazon Security Lake resources in the Amazon Security Lake User Guide. Contents key The name of the tag. This is a general label that acts as a category for a more specific tag value (value). Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Required: Yes value The value that’s associated with the specified tag key (key). This value acts as a descriptor for the tag key. A tag value cannot be null, but it can be an empty string. Type: String Length Constraints: Minimum length of 0. Maximum length of 256. Required: Yes Tag API Version 2018-05-10 168 Amazon Security Lake See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 See Also API Version 2018-05-10 169 Amazon Security Lake API Reference Common Parameters The following list contains the parameters that all actions use for signing Signature Version 4 requests with a query string. Any action-specific parameters are listed in the topic for that action. For more information about Signature Version 4, see Signing AWS API requests in the IAM User Guide. Action The action to be performed. Type: string Required: Yes Version The API version that the request is written for, expressed in the format YYYY-MM-DD. Type: string Required: Yes X-Amz-Algorithm The hash algorithm that you used to create the request signature. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. Type: string Valid Values: AWS4-HMAC-SHA256 Required: Conditional X-Amz-Credential The credential scope value, which is a string that includes your access key, the date, the region you are targeting, the service you are requesting, and a termination string ("aws4_request"). The value is expressed in the following format: access_key/YYYYMMDD/region/service/ aws4_request. API Version 2018-05-10 170 Amazon Security Lake API Reference For more information, see Create a signed AWS API request in the IAM User Guide. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. Type: string Required: Conditional X-Amz-Date The date that is used to create the signature. The format must be ISO 8601 basic format (YYYYMMDD'T'HHMMSS'Z'). For example, the following date time is a valid X-Amz-Date value: 20120325T120000Z. Condition: X-Amz-Date is optional for all requests; it can be used to override the date used for signing requests. If the Date header is specified in the ISO 8601 basic format, X-Amz-Date is not required. When X-Amz-Date is used, it always overrides the value of the Date header. For more information, see Elements of an AWS API request signature in the IAM User Guide. Type: string Required: Conditional X-Amz-Security-Token The temporary security token that was obtained through a call to AWS Security Token Service (AWS STS). For a list of services that support temporary security credentials from AWS STS, see AWS services that work with IAM in the IAM User Guide. Condition: If you're using temporary security credentials from AWS STS, you must include the security token. Type: string Required: Conditional X-Amz-Signature Specifies the hex-encoded signature that was calculated from the string to sign and the derived signing key. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. API Version 2018-05-10 171 Amazon Security Lake Type: string Required: Conditional X-Amz-SignedHeaders API Reference Specifies all the HTTP headers that were included as part of the canonical request. For more information about specifying signed headers, see Create a signed AWS API request in the IAM User Guide. Condition: Specify this parameter when you include authentication information in a query string instead of in the HTTP authorization header. Type: string Required: Conditional API Version 2018-05-10 172 Amazon Security Lake API Reference Common Errors This section lists the errors common to the API actions of all AWS services. For errors specific to an API action for this service, see the topic for that API action. AccessDeniedException You do not have sufficient access to perform this action. HTTP Status Code: 403 ExpiredTokenException The security token included in the request is expired HTTP Status Code: 403 IncompleteSignature The request signature does not conform to AWS standards. HTTP Status Code: 403 InternalFailure The request processing has failed because of an unknown error, exception or failure. HTTP Status Code: 500 MalformedHttpRequestException Problems with the request at the HTTP level, e.g. we can't decompress the body according to the decompression algorithm specified by |
amazonsecuritylake-api-034 | amazonsecuritylake-api.pdf | 34 | For errors specific to an API action for this service, see the topic for that API action. AccessDeniedException You do not have sufficient access to perform this action. HTTP Status Code: 403 ExpiredTokenException The security token included in the request is expired HTTP Status Code: 403 IncompleteSignature The request signature does not conform to AWS standards. HTTP Status Code: 403 InternalFailure The request processing has failed because of an unknown error, exception or failure. HTTP Status Code: 500 MalformedHttpRequestException Problems with the request at the HTTP level, e.g. we can't decompress the body according to the decompression algorithm specified by the content-encoding. HTTP Status Code: 400 NotAuthorized You do not have permission to perform this action. HTTP Status Code: 401 OptInRequired The AWS access key ID needs a subscription for the service. API Version 2018-05-10 173 Amazon Security Lake HTTP Status Code: 403 RequestAbortedException API Reference Convenient exception that can be used when a request is aborted before a reply is sent back (e.g. client closed connection). HTTP Status Code: 400 RequestEntityTooLargeException Problems with the request at the HTTP level. The request entity is too large. HTTP Status Code: 413 RequestExpired The request reached the service more than 15 minutes after the date stamp on the request or more than 15 minutes after the request expiration date (such as for pre-signed URLs), or the date stamp on the request is more than 15 minutes in the future. HTTP Status Code: 400 RequestTimeoutException Problems with the request at the HTTP level. Reading the Request timed out. HTTP Status Code: 408 ServiceUnavailable The request has failed due to a temporary failure of the server. HTTP Status Code: 503 ThrottlingException The request was denied due to request throttling. HTTP Status Code: 400 UnrecognizedClientException The X.509 certificate or AWS access key ID provided does not exist in our records. HTTP Status Code: 403 API Version 2018-05-10 174 Amazon Security Lake UnknownOperationException API Reference The action or operation requested is invalid. Verify that the action is typed correctly. HTTP Status Code: 404 ValidationError The input fails to satisfy the constraints specified by an AWS service. HTTP Status Code: 400 API Version 2018-05-10 175 |
amb-btc-dg-001 | amb-btc-dg.pdf | 1 | Developer Guide AMB Access Bitcoin Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. AMB Access Bitcoin Developer Guide AMB Access Bitcoin: Developer Guide Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. AMB Access Bitcoin Table of Contents Developer Guide What is Amazon Managed Blockchain (AMB) Access Bitcoin? ....................................................... 1 Are you a first-time AMB Access Bitcoin user? ....................................................................................... 1 Key concepts .................................................................................................................................... 3 Considerations and limitations .................................................................................................................. 3 Setting up ........................................................................................................................................ 6 Prerequisites and considerations ............................................................................................................... 6 Sign up for AWS ...................................................................................................................................... 6 Create an IAM user with appropriate permissions ................................................................................ 7 Install and configure the AWS Command Line Interface ..................................................................... 7 Getting started ................................................................................................................................ 8 Create an IAM policy ................................................................................................................................... 8 Console RPC example .................................................................................................................................. 9 awscurl RPC example ................................................................................................................................ 10 Node.js RPC example ................................................................................................................................. 11 AMB Access Bitcoin over PrivateLink ..................................................................................................... 15 Bitcoin use cases ............................................................................................................................ 16 Build a Bitcoin (BTC) wallet to send and receive BTC ......................................................................... 16 Analyze activity on the Bitcoin blockchain ........................................................................................... 16 Verify messages signed using a Bitcoin key pair ................................................................................. 17 Inspect the Bitcoin mempool .................................................................................................................. 17 Bitcoin JSON-RPCs ......................................................................................................................... 18 Supported JSON-RPCs .............................................................................................................................. 18 Security .......................................................................................................................................... 22 Data protection ........................................................................................................................................... 23 Data encryption ..................................................................................................................................... 24 Encryption in transit ............................................................................................................................ 24 Identity and access management ........................................................................................................... 24 Audience .................................................................................................................................................. 24 Authenticating with identities ............................................................................................................ 25 Managing access using policies .......................................................................................................... 28 How Amazon Managed Blockchain (AMB) Access Bitcoin works with IAM ................................ 31 Identity-based policy examples ......................................................................................................... 37 Troubleshooting .................................................................................................................................... 42 CloudTrail logs ............................................................................................................................... 44 iii AMB Access Bitcoin Developer Guide AMB Access Bitcoin information in CloudTrail ..................................................................................... 44 Understanding AMB Access Bitcoin log file entries ............................................................................ 45 Using CloudTrail to track Bitcoin JSON-RPCs ................................................................................. 45 iv AMB Access Bitcoin Developer Guide What is Amazon Managed Blockchain (AMB) Access Bitcoin? Amazon Managed Blockchain (AMB) Access provides you with public blockchain nodes for Ethereum and Bitcoin, and you can also create private blockchain networks with the Hyperledger Fabric framework. Choose from various methods to engage with public blockchains, including fully managed, single-tenant (dedicated), and serverless multi-tenant API operations to public blockchain nodes. For use cases where access controls are important, you can choose from fully managed private blockchain networks. Standardized API operations give you instant scalability on a fully managed, resilient infrastructure, so you can build blockchain applications. AMB Access gives you two distinct types of blockchain infrastructure services: multi-tenant blockchain network access API operations and dedicated blockchain nodes and networks. With dedicated blockchain infrastructure, you can create and use public Ethereum blockchain nodes and private Hyperledger Fabric blockchain networks for your own use. Multi-tenant, API-based offerings, however, such as AMB Access Bitcoin, are composed of a fleet of Bitcoin nodes behind an API layer where the underlying blockchain node infrastructure is shared among customers. Bitcoin is a decentralized blockchain network that enables secure peer-to-peer transactions of value denominated in the network’s native cryptocurrency, Bitcoin (BTC). The Bitcoin network is used by individuals, financial institutions, fintech companies, governments, and more. The Bitcoin network is a medium of exchange, a commodity for investment, or a publicly verifiable and immutable ledger for inscribed data. With Amazon Managed Blockchain (AMB) Access Bitcoin, you can access a pool of Bitcoin Mainnet and Testnet networks through Regional endpoints, through which you can write transactions, read data from the ledger, and invoke JSON-RPC requests available on the Bitcoin Core node client. With serverless Bitcoin endpoints, you can focus on building your applications instead of investing in undifferentiated work such as provisioning, maintaining, and load-balancing Bitcoin nodes. Whether you’re building a Bitcoin wallet, building a crypto exchange, or analyzing Bitcoin blockchain data, you only pay for the requests that you make through the Bitcoin endpoints by using AMB Access Bitcoin. Are you a first-time AMB Access Bitcoin user? If you are a first-time user of AMB Access Bitcoin, we recommend that you begin by reading the following sections: • Key concepts: Amazon Managed Blockchain (AMB) Access Bitcoin Are you a first-time AMB Access Bitcoin user? 1 AMB Access Bitcoin Developer Guide • Getting started with Amazon Managed Blockchain (AMB) Access Bitcoin • Bitcoin use cases with Amazon Managed Blockchain (AMB) Access Bitcoin • Supported Bitcoin JSON-RPCs with Amazon Managed Blockchain (AMB) Access Bitcoin Are you a first-time AMB Access Bitcoin user? 2 AMB Access Bitcoin Developer Guide Key concepts: Amazon Managed Blockchain (AMB) Access Bitcoin Note This guide assumes that you're familiar |
amb-btc-dg-002 | amb-btc-dg.pdf | 2 | first-time user of AMB Access Bitcoin, we recommend that you begin by reading the following sections: • Key concepts: Amazon Managed Blockchain (AMB) Access Bitcoin Are you a first-time AMB Access Bitcoin user? 1 AMB Access Bitcoin Developer Guide • Getting started with Amazon Managed Blockchain (AMB) Access Bitcoin • Bitcoin use cases with Amazon Managed Blockchain (AMB) Access Bitcoin • Supported Bitcoin JSON-RPCs with Amazon Managed Blockchain (AMB) Access Bitcoin Are you a first-time AMB Access Bitcoin user? 2 AMB Access Bitcoin Developer Guide Key concepts: Amazon Managed Blockchain (AMB) Access Bitcoin Note This guide assumes that you're familiar with the concepts that are essential to Bitcoin. These concepts include decentralization, nodes, transactions, proof-of-work, wallets, public and private keys, halvings, and others. Before using Amazon Managed Blockchain (AMB) Access Bitcoin, we recommend that you review the Bitcoin Development Documentation and Mastering Bitcoin. Amazon Managed Blockchain (AMB) Access Bitcoin provides you with serverless access to the Bitcoin blockchain, without requiring you to provision and manage any Bitcoin infrastructure, including nodes. You can use this managed service to access the Bitcoin networks quickly and on- demand, reducing your overall cost of ownership. The AMB Access Bitcoin provides you with access to the Bitcoin network through full nodes running the Bitcoin Core client, with the wallet functionality disabled, and supporting several JSON Remote Procedure (JSON-RPC) calls. You can invoke Bitcoin JSON RPCs to communicate with Bitcoin nodes managed by Managed Blockchain to interact with the Bitcoin networks. With the Bitcoin JSON-RPCs, you can read data and write transactions, including querying data and submitting transactions to the Bitcoin networks by using the Amazon Managed Blockchain service. Important You are responsible for creating, maintaining, using, and managing your Bitcoin addresses. You are also responsible for the contents of your Bitcoin addresses. AWS is not responsible for any transactions deployed or called using Bitcoin nodes on Amazon Managed Blockchain. Considerations and limitations for using Amazon Managed Blockchain (AMB) Access Bitcoin • Supported Bitcoin networks Considerations and limitations 3 AMB Access Bitcoin Developer Guide AMB Access Bitcoin supports the following public networks: • Mainnet—The public Bitcoin blockchain secured by proof-of-work consensus, and on which the Bitcoin (BTC) cryptocurrency is issued and transacted. Transactions on Mainnet have actual value (that is, they incur real costs) and are recorded on the public blockchain. • Testnet—The testnet is an alternative Bitcoin blockchain used for testing. Testnet coins are separate and distinct from actual Bitcoin (BTC) and do not usually have any value. Note Private networks aren't supported. • Supported Regions The following are the supported Regions for this service: Region name US East (N. Virginia) Asia Pacific (Tokyo) Asia Pacific (Seoul) Asia Pacific (Singapore) Europe (Ireland) Europe (London) • Service endpoints Code Region IAD NRT ICN SIN DUB LHR us-east-1 ap-northeast-1 ap-northeast-2 ap-southeast-1 eu-west-1 eu-west-2 The following are the service endpoints for AMB Access Bitcoin. To connect with the service, you must use an endpoint that includes one of the supported Regions. • mainnet.bitcoin.managedblockchain.Region.amazonaws.com • testnet.bitcoin.managedblockchain.Region.amazonaws.com For example: mainnet.bitcoin.managedblockchain.eu-west-2.amazonaws.com • Mining not supported Considerations and limitations 4 AMB Access Bitcoin Developer Guide AMB Access Bitcoin does not support Bitcoin (BTC) mining. • Signature Version 4 signing of Bitcoin JSON-RPC calls When making calls to the Bitcoin JSON-RPCs on Amazon Managed Blockchain, you can do so over an HTTPS connection authenticated using the Signature Version 4 signing process. This means that only authorized IAM principals in the AWS account can make Bitcoin JSON-RPC calls. To do this, AWS credentials (an access key ID and a secret access key) must be provided with the call. Important • Do not embed client credentials in user-facing applications. • You can't use IAM policies to restrict access to individual Bitcoin JSON-RPCs. • Only submissions of raw transactions are supported Use the sendrawtransaction JSON-RPC to submit transactions that update the Bitcoin blockchain state. • AWS CloudTrail logging support You can configure CloudTrail to log your Bitcoin JSON-RPCs. For more information, see Logging Amazon Managed Blockchain (AMB) Access Bitcoin events by using AWS CloudTrail Considerations and limitations 5 AMB Access Bitcoin Developer Guide Setting up Amazon Managed Blockchain (AMB) Access Bitcoin Before you use Amazon Managed Blockchain (AMB) Access Bitcoin for the first time, follow the steps in this section to create an AWS account. The following chapter discusses how to start using AMB Access Bitcoin. Prerequisites and considerations Before you use AWS for the first time, you must have an AWS account. Sign up for AWS When you sign up for AWS, your AWS account is automatically signed up for all AWS services, including Amazon Managed Blockchain (AMB) Access Bitcoin. You're charged only for the services that you use. If you have an AWS account already, go to the next step. If you don't have an AWS account, use the following procedure to create one. |
amb-btc-dg-003 | amb-btc-dg.pdf | 3 | steps in this section to create an AWS account. The following chapter discusses how to start using AMB Access Bitcoin. Prerequisites and considerations Before you use AWS for the first time, you must have an AWS account. Sign up for AWS When you sign up for AWS, your AWS account is automatically signed up for all AWS services, including Amazon Managed Blockchain (AMB) Access Bitcoin. You're charged only for the services that you use. If you have an AWS account already, go to the next step. If you don't have an AWS account, use the following procedure to create one. To create an AWS account 1. Open https://portal.aws.amazon.com/billing/signup. 2. Follow the online instructions. Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad. When you sign up for an AWS account, an AWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform tasks that require root user access. Prerequisites and considerations 6 AMB Access Bitcoin Developer Guide Create an IAM user with appropriate permissions To create and work with AMB Access Bitcoin, you must have an AWS Identity and Access Management (IAM) principal (user or group) with permissions that allow necessary Managed Blockchain actions. Only IAM principals can make Bitcoin JSON-RPC calls. When making calls to the Bitcoin JSON-RPCs on Amazon Managed Blockchain, you can do so over an HTTPS connection authenticated using the Signature Version 4 signing process. This means that only authorized IAM principals in the AWS account can make Bitcoin JSON-RPC calls. To do this, AWS credentials (an access key ID and a secret access key) must be provided with the call. For information about how to create an IAM user, see Creating an IAM user in your AWS account. For more information about how to attach a permissions policy to a user, see Changing permissions for an IAM user. For an example of a permissions policy that you can use to give a user permission to work with AMB Access Bitcoin, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Bitcoin. Install and configure the AWS Command Line Interface If you have not already done so, install the latest AWS Command-Line Interface (CLI) to work with AWS resources from a terminal. For more information, see Installing or updating the latest version of the AWS CLI. Note For CLI access, you need an access key ID and a secret access key. Use temporary credentials instead of long-term access keys when possible. Temporary credentials include an access key ID, a secret access key, and a security token that indicates when the credentials expire. For more information, see Using temporary credentials with AWS resources in the IAM User Guide. Create an IAM user with appropriate permissions 7 AMB Access Bitcoin Developer Guide Getting started with Amazon Managed Blockchain (AMB) Access Bitcoin Use the step-by-step tutorials in this section to learn how to perform tasks by using Amazon Managed Blockchain (AMB) Access Bitcoin. These examples require you to complete some prerequisites. If you are new to AMB Access Bitcoin, review the Setting up section of this guide to make sure you have completed those prerequisites. For more information, see Setting up Amazon Managed Blockchain (AMB) Access Bitcoin. Topics • Create an IAM policy to access Bitcoin JSON-RPCs • Make Bitcoin remote procedure call (RPC) requests on the AMB Access RPC editor using the AWS Management Console • Make AMB Access Bitcoin JSON-RPC requests in awscurl by using the AWS CLI • Make Bitcoin JSON-RPC requests in Node.js • Use AMB Access Bitcoin over AWS PrivateLink Create an IAM policy to access Bitcoin JSON-RPCs In order to access the public endpoints for the Bitcoin Mainnet and Testnet to make JSON-RPC calls, you must have user credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) that have the appropriate IAM permissions for Amazon Managed Blockchain (AMB) Access Bitcoin. In a terminal with the AWS CLI installed, run the following command to create an IAM Policy to access both Bitcoin endpoints: cat <<EOT > ~/amb-btc-access-policy.json { "Version": "2012-10-17", "Statement": [ { "Sid" : "AMBBitcoinAccessPolicy", "Effect": "Allow", "Action": [ "managedblockchain:InvokeRpcBitcoin*" ], "Resource": "*" Create an IAM policy 8 AMB Access Bitcoin } ] } EOT Developer Guide aws iam create-policy --policy-name AmazonManagedBlockchainBitcoinAccess --policy- document file://$HOME/amb-btc-access-policy.json Note The previous example gives you access to both the Bitcoin Mainnet and Testnet. To get access to a specific endpoint, use the following Action command: • "managedblockchain:InvokeRpcBitcoinMainnet" • "managedblockchain:InvokeRpcBitcoinTestnet" After you create the policy, attach that policy to your IAM user’s Role for it to take effect. In the AWS Management Console, navigate to the IAM service, and attach the policy AmazonManagedBlockchainBitcoinAccess to the |
amb-btc-dg-004 | amb-btc-dg.pdf | 4 | [ { "Sid" : "AMBBitcoinAccessPolicy", "Effect": "Allow", "Action": [ "managedblockchain:InvokeRpcBitcoin*" ], "Resource": "*" Create an IAM policy 8 AMB Access Bitcoin } ] } EOT Developer Guide aws iam create-policy --policy-name AmazonManagedBlockchainBitcoinAccess --policy- document file://$HOME/amb-btc-access-policy.json Note The previous example gives you access to both the Bitcoin Mainnet and Testnet. To get access to a specific endpoint, use the following Action command: • "managedblockchain:InvokeRpcBitcoinMainnet" • "managedblockchain:InvokeRpcBitcoinTestnet" After you create the policy, attach that policy to your IAM user’s Role for it to take effect. In the AWS Management Console, navigate to the IAM service, and attach the policy AmazonManagedBlockchainBitcoinAccess to the Role assigned to your IAM user. For more information, see Creating a Role and assigning to an IAM user. Make Bitcoin remote procedure call (RPC) requests on the AMB Access RPC editor using the AWS Management Console You can edit and submit remote procedure calls (RPCs) on the AWS Management Console using AMB Access. With these RPCs, you can read data, write, and submit transactions on the Bitcoin network. Example The following example shows how to get information about the 00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09 blockhash by using getBlock RPC. Replace the highlighted variables with your own inputs or choose one of the other RPC methods listed and enter the relevant inputs required. 1. Open the Managed Blockchain console at https://console.aws.amazon.com/ managedblockchain/. 2. Choose RPC editor. Console RPC example 9 AMB Access Bitcoin Developer Guide 3. In the Request section, choose BITCOIN_MAINNET as the Blockchain Network. 4. Choose getblock as the RPC method. 5. Enter 00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09 as the Block number and choose 0 as the verbosity. 6. Then, choose Submit RPC. 7. You will get results in the Response section of this page. You can then copy the full raw transactions for further analysis or to use in business logic for your applications. For more information, see the RPCs supported by AMB Access Bitcoin Make AMB Access Bitcoin JSON-RPC requests in awscurl by using the AWS CLI Example Sign requests with your IAM user credentials by using Signature Version 4 (SigV4) in order to make Bitcoin JSON-RPC calls to the AMB Access Bitcoin endpoints. The awscurl command line tool can help you sign requests to AWS services using SigV4. For more information, see the awscurl README.md. Install awscurl by using the method appropriate to your operating system. On macOS, HomeBrew is the recommended application: brew install awscurl If you have already installed and configured the AWS CLI, your IAM user credentials and default AWS Region are set in your environment and have access to awscurl. Using awscurl, submit a request to both the Bitcoin Mainnet and Testnet by invoking the getblock RPC. This call accepts a string parameter corresponding to the block hash for which you want to retrieve information. The following command retrieves the block header data from the Bitcoin Mainnet by using the block hash in the params array to select the specific block for which to retrieve the headers. This example uses the us-east-1 endpoint. You can replace this with your preferred Bitcoin JSON- RPC and AWS Region that is supported by Amazon Managed Blockchain (AMB) Access Bitcoin. Furthermore, you can make a request against the Testnet network, rather than Mainnet, by replacing mainnet with testnet in the command. awscurl RPC example 10 AMB Access Bitcoin Developer Guide awscurl -X POST -d '{ "jsonrpc": "1.0", "id": "getblockheader-curltest", "method": "getblockheader", "params": ["0000000000000000000105bebab2f9dd16234a30950d38ec6ddc24d466e750a0"] }' --service managedblockchain https://mainnet.bitcoin.managedblockchain.us-east-1.amazonaws.com --region us-east-1 -k The results include details from the block headers and a list of transaction hashes included in the requested block. See the following example: {"result":{"hash":"0000000000000000000105bebab2f9dd16234a30950d38ec6ddc24d466e750a0", "confirmations":2,"height":799243,"version":664485888,"versionHex":"279b4000", "merkleroot":"568e79752e1921ecf40c961435abb41bc5700fe2833ecadc4abfc2f615ddc1b8", "time":1689684290,"mediantime":1689681317,"nonce":2091174943,"bits":"17053894", "difficulty":53911173001054.59, "chainwork":"00000000000000000000000000000000000000004f375cf72ff64e2404c1589c", "nTx":2135, "previousblockhash":"00000000000000000002ffe4efe07ae74ec8b92c7696f5e12b5da506f015ba6b", "nextblockhash":"000000000000000000038f05ddcf3f483fdcb74f4be606c022bcb673424fa4ca"}, "error":null,"id":"curltest"} Make Bitcoin JSON-RPC requests in Node.js You can submit signed requests by using HTTPS to access the Bitcoin Mainnet and Testnet endpoints and to make JSON-RPC API calls by using the native https module in Node.js, or you can use a third-party library such as AXIOS. The following example shows you how to make a Bitcoin JSON-RPC request to the AMB Access Bitcoin endpoints. Example To run this example Node.js script, apply the following prerequisites: 1. You must have node version manager (nvm) and Node.js installed on your machine. You can find installation instructions for your OS here. 2. Use the node --version command and confirm that you are using Node version 14 or higher. If required, you can use the nvm install 14 command, followed by the nvm use 14 command, to install version 14. Node.js RPC example 11 AMB Access Bitcoin Developer Guide 3. The environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY must contain the credentials that are associated with your account. The environment variables AMB_HTTP_ENDPOINT must contain your AMB Access Bitcoin endpoints. Export these variables as strings on your client by using the following commands. Replace the highlighted values in the following strings with appropriate values from your IAM |
amb-btc-dg-005 | amb-btc-dg.pdf | 5 | the node --version command and confirm that you are using Node version 14 or higher. If required, you can use the nvm install 14 command, followed by the nvm use 14 command, to install version 14. Node.js RPC example 11 AMB Access Bitcoin Developer Guide 3. The environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY must contain the credentials that are associated with your account. The environment variables AMB_HTTP_ENDPOINT must contain your AMB Access Bitcoin endpoints. Export these variables as strings on your client by using the following commands. Replace the highlighted values in the following strings with appropriate values from your IAM user account. export AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" export AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" After you complete all prerequisites, copy the following package.json file and index.js script into your local environment by using your editor: package.json { "name": "bitcoin-rpc", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "@aws-crypto/sha256-js": "^4.0.0", "@aws-sdk/credential-provider-node": "^3.360.0", "@aws-sdk/protocol-http": "^3.357.0", "@aws-sdk/signature-v4": "^3.357.0", "axios": "^1.4.0" } } index.js const axios = require('axios'); const SHA256 = require('@aws-crypto/sha256-js').Sha256 const defaultProvider = require('@aws-sdk/credential-provider-node').defaultProvider const HttpRequest = require('@aws-sdk/protocol-http').HttpRequest const SignatureV4 = require('@aws-sdk/signature-v4').SignatureV4 Node.js RPC example 12 AMB Access Bitcoin Developer Guide // define a signer object with AWS service name, credentials, and region const signer = new SignatureV4({ credentials: defaultProvider(), service: 'managedblockchain', region: 'us-east-1', sha256: SHA256, }); const rpcRequest = async () => { // create a remote procedure call (RPC) request object definig the method, input params let rpc = { jsonrpc: "1.0", id: "1001", method: 'getblock', params: ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] } //bitcoin endpoint let bitcoinURL = 'https://mainnet.bitcoin.managedblockchain.us- east-1.amazonaws.com/'; // parse the URL into its component parts (e.g. host, path) const url = new URL(bitcoinURL); // create an HTTP Request object const req = new HttpRequest({ hostname: url.hostname.toString(), path: url.pathname.toString(), body: JSON.stringify(rpc), method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept-Encoding': 'gzip', host: url.hostname, } }); // use AWS SignatureV4 utility to sign the request, extract headers and body const signedRequest = await signer.sign(req, { signingDate: new Date() }); Node.js RPC example 13 AMB Access Bitcoin Developer Guide try { //make the request using axios const response = await axios({...signedRequest, url: bitcoinURL, data: req.body}) console.log(response.data) } catch (error) { console.error('Something went wrong: ', error) throw error } } rpcRequest(); The previous sample code uses Axios to make RPC requests to the Bitcoin endpoint, and it signs those requests with the appropriate Signature Version 4 (SigV4) headers by using the official AWS SDK v3 tools. To run the code, open a terminal in the same directory as your files and run the following: npm i node index.js The result that is generated will resemble the following: {"hash":"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"," confirmations":784126,"height":1000, "version":1,"versionHex":"00000001", "merkleroot":"fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33", "time":1232346882, "mediantime":1232344831,"nonce":2595206198,"bits":"1d00ffff","difficulty":1, "chainwork":"000000000000000000000000000000000000000000000000000003e903e903e9", "nTx":1, "previousblockhash":"0000000008e647742775a230787d66fdf92c46a48c896bfbc85cdc8acc67e87d", "nextblockhash":"00000000a2887344f8db859e372e7e4bc26b23b9de340f725afbf2edb265b4c6", "strippedsize":216,"size":216,"weight":864, "tx":["fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"]}, "error":null,"id":"1001"} Node.js RPC example 14 AMB Access Bitcoin Note Developer Guide The sample request in the previous script makes the getblock call with the same input parameter block hash as the Make AMB Access Bitcoin JSON-RPC requests in awscurl by using the AWS CLI example. To make other calls, modify the rpc object in the script with a different Bitcoin JSON-RPC. You can change the host property option to the Bitcoin testnet to make calls on that endpoint. Use AMB Access Bitcoin over AWS PrivateLink AWS PrivateLink is a highly available, scalable technology that you can use to connect your VPC to services privately as if they were in your VPC. You do not have to use an internet gateway, NAT device, public IP address, AWS Direct Connect connection, or AWS Site-to-Site VPN connection to communicate with the service from your private subnets. For more information about AWS PrivateLink or to set up AWS PrivateLink, see What is AWS PrivateLink? You can send Bitcoin JSON-RPC requests to AMB Access Bitcoin over AWS PrivateLink by using a VPC endpoint. Requests to this private endpoint aren't passed over the open internet, so you can send requests directly to the Bitcoin endpoints by using the same SigV4 authentication. For more information, see Access AWS services through AWS PrivateLink. For the Service name, look for Amazon Managed Blockchain in the AWS service column. For more information, see AWS services that integrate with AWS PrivateLink. The service name for the endpoint will be in the following format: com.amazonaws.AWS- REGION.managedblockchain.bitcoin.NETWORK-TYPE. For example: com.amazonaws.us-east-1.managedblockchain.bitcoin.testnet. AMB Access Bitcoin over PrivateLink 15 AMB Access Bitcoin Developer Guide Bitcoin use cases with Amazon Managed Blockchain (AMB) Access Bitcoin This topic provides a list AMB Access Bitcoin use cases Topics • Build a Bitcoin (BTC) wallet to send and receive BTC • Analyze activity on the Bitcoin blockchain • Verify messages signed using a Bitcoin key pair • Inspect the Bitcoin mempool Build a Bitcoin (BTC) wallet to send and receive BTC BTC, the native cryptocurrency on the Bitcoin network, serves as an essential component of the network's security model. It |
amb-btc-dg-006 | amb-btc-dg.pdf | 6 | following format: com.amazonaws.AWS- REGION.managedblockchain.bitcoin.NETWORK-TYPE. For example: com.amazonaws.us-east-1.managedblockchain.bitcoin.testnet. AMB Access Bitcoin over PrivateLink 15 AMB Access Bitcoin Developer Guide Bitcoin use cases with Amazon Managed Blockchain (AMB) Access Bitcoin This topic provides a list AMB Access Bitcoin use cases Topics • Build a Bitcoin (BTC) wallet to send and receive BTC • Analyze activity on the Bitcoin blockchain • Verify messages signed using a Bitcoin key pair • Inspect the Bitcoin mempool Build a Bitcoin (BTC) wallet to send and receive BTC BTC, the native cryptocurrency on the Bitcoin network, serves as an essential component of the network's security model. It also acts as a commodity and medium of exchange, widely used by institutions, businesses, and individuals. Consequently, many wallet applications rely on Bitcoin nodes to interact with the Bitcoin blockchain. These applications calculate the balance of unspent outputs (UTXOs) for a given set of addresses, sign and send transactions to the Bitcoin network, and retrieve data about historical transactions. The following is a sample of some of the Bitcoin JSON-RPCs that Amazon Managed Blockchain (AMB) Access Bitcoin supports for BTC wallet transactions: • estimatesmartfee • createmultisig • createrawtransaction • sendrawtransaction For more information, see Supported JSON-RPCs. Analyze activity on the Bitcoin blockchain You can analyze the volume of transaction activity on the Bitcoin blockchain by using the getchaintxstats JSON-RPC method. This JSON-RPC allows you to access metrics such as Build a Bitcoin (BTC) wallet to send and receive BTC 16 AMB Access Bitcoin Developer Guide average transaction rates per second, total transaction count, block count, and more. You can also define a window of block numbers or a block hash as a delimiter to calculate these statistics for a specific set of blocks in the network, if desired. For more information, see Supported JSON-RPCs. Verify messages signed using a Bitcoin key pair Bitcoin wallets have a private key and a public key that make up a key pair. These keys are used to sign transactions and serve as the user's identity on the blockchain. The public key is used to create addresses, which are standardized alphanumeric identifiers (27 to 34 characters long). These addresses are used to receive BTC outputs and handle transactions or messages. With a Bitcoin wallet, users can also sign and verify messages cryptographically. This process is often used to prove ownership of a specific wallet address and the BTC associated with it. By using the verifymessage Bitcoin JSON-RPC, you can check the authenticity and validity of a message signed by another wallet. Specifically, a Bitcoin node can be used to verify if a message has been signed using the private key corresponding to the provided public key derived address within the signed message itself. For more information, see Supported JSON-RPCs. Inspect the Bitcoin mempool Many applications need to access the mempool to keep track of pending transactions, get a list of all pending transactions, or find out where a transaction came from. To do this, there are Bitcoin JSON-RPCs like getmempoolancestors, getmempoolentry, and getrawmempool that support this activity. These Bitcoin JSON-RPCs help applications get the information they need from the mempool. Amazon Managed Blockchain (AMB) Access Bitcoin also supports the testmempoolaccept Bitcoin JSON-RPCs, which allows you to verify if a transaction meets protocol rules and would be accepted by a node before submitting. Wallets, exchanges, and any other entities who directly submit transactions to the Bitcoin blockchain utilize these Bitcoin JSON-RPCs. For more information, see Supported JSON-RPCs. Verify messages signed using a Bitcoin key pair 17 AMB Access Bitcoin Developer Guide Supported Bitcoin JSON-RPCs with Amazon Managed Blockchain (AMB) Access Bitcoin This topic provides a list of and references to the Bitcoin JSON-RPCs that Managed Blockchain supports. Each supported JSON-RPC has a brief description of its use. Note • You can authenticate Bitcoin JSON-RPCs on Managed Blockchain by using the Signature Version 4 (SigV4) signing process. This means that only authorized IAM principals in the AWS account can interact with it by using the Bitcoin JSON-RPCs. Provide AWS credentials (an access key ID and secret access key) with the call. • If your HTTP response is larger than 10 MB, you will get an error. To correct this, you must set the compression headers to Accept-Encoding:gzip. The compressed response your client then receives contains the following headers: Content-Type: application/json and Content-Encoding: gzip. • Amazon Managed Blockchain (AMB) Access Bitcoin generates a 400 error for malformed JSON-RPC requests. • Use the sendrawtransaction JSON-RPC to submit transactions that update the Bitcoin blockchain state. • AMB Access Bitcoin has a default request limit of 100 requests per second (RPS), per NETWORK_TYPE, per AWS Region. For increasing your quota, you must contact AWS support. To contact AWS support, sign into the AWS Support Center Console. Choose Create case. Choose Technical. Choose Managed Blockchain as your service. Choose Access:Bitcoin as your |
amb-btc-dg-007 | amb-btc-dg.pdf | 7 | The compressed response your client then receives contains the following headers: Content-Type: application/json and Content-Encoding: gzip. • Amazon Managed Blockchain (AMB) Access Bitcoin generates a 400 error for malformed JSON-RPC requests. • Use the sendrawtransaction JSON-RPC to submit transactions that update the Bitcoin blockchain state. • AMB Access Bitcoin has a default request limit of 100 requests per second (RPS), per NETWORK_TYPE, per AWS Region. For increasing your quota, you must contact AWS support. To contact AWS support, sign into the AWS Support Center Console. Choose Create case. Choose Technical. Choose Managed Blockchain as your service. Choose Access:Bitcoin as your Category and General guidance as your Severity. Enter RPC Quota as the Subject and in the Description text box and list the quota limits applicable to your needs in RPS per Bitcoin network per Region. Submit your case. Supported JSON-RPCs AMB Access Bitcoin supports the following Bitcoin JSON-RPCs. Each supported call has a brief description of its use. Supported JSON-RPCs 18 AMB Access Bitcoin Developer Guide Category JSON-RPC Description Blockchain RPCs getbestblockhash Returns the hash of the best (tip) block in the most-work, fully validated chain. getblock getblockchaininfo getblockcount getblockfilter getblockhash getblockheader getblockstats If verbosity is 0, returns a string that is serialized, hex-encoded data for block ‘hash’. If verbosity is 1, returns an Object with informati on about the block ‘hash’. If verbosity is 2, returns an Object with information about the block ‘hash’ and information about each transaction. If verbosity is 3, returns an Object with information about the block ‘hash’ and information about each transaction, including the prevout information for inputs. Returns an object containing various state info regarding blockchain processing. Returns the height of the most-work, fully validated chain. The genesis block has height 0. Retrieves a BIP 157 content filter for a particular block using the block hash. Returns hash of block in best-block-chain at height provided. If verbose is false, returns a string that is serialized, hex-encoded data for blockhead er ‘hash’. If verbose is true, returns an Object with information about blockheader ‘hash’. Computes per block statistics for a given window. All amounts are in satoshis. It won’t work for some heights with pruning. Supported JSON-RPCs 19 AMB Access Bitcoin Developer Guide Category JSON-RPC Description getchaintips getchaintxstats getdifficulty Returns information about all known tips in the block tree, including the main chain and orphaned branches. Computes statistics about the total number and rate of transactions in the chain. Returns the proof-of-work difficulty as a multiple of the minimum difficulty. getmempoolancestors If txid is in the mempool, returns all in- mempool ancestors. getmempooldescendants If txid is in the mempool, returns all in- mempool descendants. getmempoolentry Returns mempool data for given transaction. getmempoolinfo getrawmempool Returns details on the active state of the TX memory pool. Returns all transaction IDs in memory pool as a JSON array of string transaction IDs. Note verbose = true is not supported. gettxout gettxoutproof Returns details about an unspent transaction output. Returns a hex-encoded proof that “txid” was included in a block. Rawtransa ctions RPCs createrawtransaction Creates a transaction spending the given inputs and creating new outputs. Supported JSON-RPCs 20 AMB Access Bitcoin Developer Guide Category JSON-RPC Description decoderawtransaction Returns a JSON object representing the serialized, hex-encoded transaction. decodescript Decodes a hex-encoded script. getrawtransaction Returns the raw transaction data. sendrawtransaction testmempoolaccept Util RPCs createmultisig estimatesmartfee Submits a raw transaction (serialized, hex- encoded) to local node and network. Returns result of mempool acceptance tests indicating if raw transaction (serialized, hex- encoded) would be accepted by mempool. This checks if the transaction violates the consensus or policy rules. Creates a multi-signature address with n signature of m keys required. Estimates the approximate fee per kilobyte required for a transaction to begin confirmat ion within conf_target blocks, if possible, and returns the number of blocks for which the estimate is valid. Uses virtual transacti on size, as defined in BIP 141 (witness data is discounted). validateaddress Returns information about the given bitcoin address. verifymessage Verifies a signed message. Supported JSON-RPCs 21 AMB Access Bitcoin Developer Guide Security in Amazon Managed Blockchain (AMB) Access Bitcoin Cloud security at AWS is of the highest priority. As an AWS customer, you benefit from data centers and network architectures that are built to meet the requirements of the most security-sensitive organizations. Security is a shared responsibility between AWS and you. The shared responsibility model describes this as both security of the cloud and security in the cloud: • Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. Third- party auditors regularly test and verify the effectiveness of our security as part of the AWS Compliance Programs. To learn about the compliance programs that apply to |
amb-btc-dg-008 | amb-btc-dg.pdf | 8 | network architectures that are built to meet the requirements of the most security-sensitive organizations. Security is a shared responsibility between AWS and you. The shared responsibility model describes this as both security of the cloud and security in the cloud: • Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. Third- party auditors regularly test and verify the effectiveness of our security as part of the AWS Compliance Programs. To learn about the compliance programs that apply to Amazon Managed Blockchain (AMB) Access Bitcoin, see AWS Services in Scope by Compliance Program. • Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors, including the sensitivity of your data, your company’s requirements, and applicable laws and regulations. To provide data protection, authentication, and access control, Amazon Managed Blockchain uses AWS features and the features of the open-source framework running in Managed Blockchain. This documentation helps you understand how to apply the shared responsibility model when using AMB Access Bitcoin. The following topics show you how to configure AMB Access Bitcoin to meet your security and compliance objectives. You also learn how to use other AWS services that help you to monitor and secure your AMB Access Bitcoin resources. Topics • Data protection in Amazon Managed Blockchain (AMB) Access Bitcoin • Identity and access management for Amazon Managed Blockchain (AMB) Access Bitcoin 22 AMB Access Bitcoin Developer Guide Data protection in Amazon Managed Blockchain (AMB) Access Bitcoin The AWS shared responsibility model applies to data protection in Amazon Managed Blockchain (AMB) Access Bitcoin. As described in this model, AWS is responsible for protecting the global infrastructure that runs all of the AWS Cloud. You are responsible for maintaining control over your content that is hosted on this infrastructure. You are also responsible for the security configuration and management tasks for the AWS services that you use. For more information about data privacy, see the Data Privacy FAQ. For information about data protection in Europe, see the AWS Shared Responsibility Model and GDPR blog post on the AWS Security Blog. For data protection purposes, we recommend that you protect AWS account credentials and set up individual users with AWS IAM Identity Center or AWS Identity and Access Management (IAM). That way, each user is given only the permissions necessary to fulfill their job duties. We also recommend that you secure your data in the following ways: • Use multi-factor authentication (MFA) with each account. • Use SSL/TLS to communicate with AWS resources. We require TLS 1.2 and recommend TLS 1.3. • Set up API and user activity logging with AWS CloudTrail. For information about using CloudTrail trails to capture AWS activities, see Working with CloudTrail trails in the AWS CloudTrail User Guide. • Use AWS encryption solutions, along with all default security controls within AWS services. • Use advanced managed security services such as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3. • If you require FIPS 140-3 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see Federal Information Processing Standard (FIPS) 140-3. We strongly recommend that you never put confidential or sensitive information, such as your customers' email addresses, into tags or free-form text fields such as a Name field. This includes when you work with AMB Access Bitcoin or other AWS services using the console, API, AWS CLI, or AWS SDKs. Any data that you enter into tags or free-form text fields used for names may be used for billing or diagnostic logs. If you provide a URL to an external server, we strongly recommend that you do not include credentials information in the URL to validate your request to that server. Data protection 23 AMB Access Bitcoin Data encryption Developer Guide Data encryption helps prevent unauthorized users from reading data from a blockchain network and the associated data storage systems. This includes data that might be intercepted as it travels the network, known as data in transit. Encryption in transit By default, Managed Blockchain uses an HTTPS/TLS connection to encrypt all the data that's transmitted from a client computer that runs the AWS CLI to AWS service endpoints. You don't need to do anything to enable the use of HTTPS/TLS. It's always enabled unless you explicitly disable it for an individual AWS CLI command by using the --no-verify-ssl command. Identity and access management for Amazon Managed Blockchain (AMB) Access Bitcoin AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to |
amb-btc-dg-009 | amb-btc-dg.pdf | 9 | it travels the network, known as data in transit. Encryption in transit By default, Managed Blockchain uses an HTTPS/TLS connection to encrypt all the data that's transmitted from a client computer that runs the AWS CLI to AWS service endpoints. You don't need to do anything to enable the use of HTTPS/TLS. It's always enabled unless you explicitly disable it for an individual AWS CLI command by using the --no-verify-ssl command. Identity and access management for Amazon Managed Blockchain (AMB) Access Bitcoin AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. IAM administrators control who can be authenticated (signed in) and authorized (have permissions) to use AMB Access Bitcoin resources. IAM is an AWS service that you can use with no additional charge. Topics • Audience • Authenticating with identities • Managing access using policies • How Amazon Managed Blockchain (AMB) Access Bitcoin works with IAM • Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Bitcoin • Troubleshooting Amazon Managed Blockchain (AMB) Access Bitcoin identity and access Audience How you use AWS Identity and Access Management (IAM) differs, depending on the work that you do in AMB Access Bitcoin. Service user – If you use the AMB Access Bitcoin service to do your job, then your administrator provides you with the credentials and permissions that you need. As you use more AMB Access Data encryption 24 AMB Access Bitcoin Developer Guide Bitcoin features to do your work, you might need additional permissions. Understanding how access is managed can help you request the right permissions from your administrator. If you cannot access a feature in AMB Access Bitcoin, see Troubleshooting Amazon Managed Blockchain (AMB) Access Bitcoin identity and access. Service administrator – If you're in charge of AMB Access Bitcoin resources at your company, you probably have full access to AMB Access Bitcoin. It's your job to determine which AMB Access Bitcoin features and resources your service users should access. You must then submit requests to your IAM administrator to change the permissions of your service users. Review the information on this page to understand the basic concepts of IAM. To learn more about how your company can use IAM with AMB Access Bitcoin, see How Amazon Managed Blockchain (AMB) Access Bitcoin works with IAM. IAM administrator – If you're an IAM administrator, you might want to learn details about how you can write policies to manage access to AMB Access Bitcoin. To view example AMB Access Bitcoin identity-based policies that you can use in IAM, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Bitcoin. Authenticating with identities Authentication is how you sign in to AWS using your identity credentials. You must be authenticated (signed in to AWS) as the AWS account root user, as an IAM user, or by assuming an IAM role. You can sign in to AWS as a federated identity by using credentials provided through an identity source. AWS IAM Identity Center (IAM Identity Center) users, your company's single sign-on authentication, and your Google or Facebook credentials are examples of federated identities. When you sign in as a federated identity, your administrator previously set up identity federation using IAM roles. When you access AWS by using federation, you are indirectly assuming a role. Depending on the type of user you are, you can sign in to the AWS Management Console or the AWS access portal. For more information about signing in to AWS, see How to sign in to your AWS account in the AWS Sign-In User Guide. If you access AWS programmatically, AWS provides a software development kit (SDK) and a command line interface (CLI) to cryptographically sign your requests by using your credentials. If you don't use AWS tools, you must sign requests yourself. For more information about using the recommended method to sign requests yourself, see AWS Signature Version 4 for API requests in the IAM User Guide. Authenticating with identities 25 AMB Access Bitcoin Developer Guide Regardless of the authentication method that you use, you might be required to provide additional security information. For example, AWS recommends that you use multi-factor authentication (MFA) to increase the security of your account. To learn more, see Multi-factor authentication in the AWS IAM Identity Center User Guide and AWS Multi-factor authentication in IAM in the IAM User Guide. AWS account root user When you create an AWS account, you begin with one sign-in identity that has complete access to all AWS services and resources in the account. This identity is called the AWS account root user and is accessed by signing in with the email address and password that you used to create the account. We strongly recommend that you don't use the root user for your everyday tasks. Safeguard your root |
amb-btc-dg-010 | amb-btc-dg.pdf | 10 | account. To learn more, see Multi-factor authentication in the AWS IAM Identity Center User Guide and AWS Multi-factor authentication in IAM in the IAM User Guide. AWS account root user When you create an AWS account, you begin with one sign-in identity that has complete access to all AWS services and resources in the account. This identity is called the AWS account root user and is accessed by signing in with the email address and password that you used to create the account. We strongly recommend that you don't use the root user for your everyday tasks. Safeguard your root user credentials and use them to perform the tasks that only the root user can perform. For the complete list of tasks that require you to sign in as the root user, see Tasks that require root user credentials in the IAM User Guide. Federated identity As a best practice, require human users, including users that require administrator access, to use federation with an identity provider to access AWS services by using temporary credentials. A federated identity is a user from your enterprise user directory, a web identity provider, the AWS Directory Service, the Identity Center directory, or any user that accesses AWS services by using credentials provided through an identity source. When federated identities access AWS accounts, they assume roles, and the roles provide temporary credentials. For centralized access management, we recommend that you use AWS IAM Identity Center. You can create users and groups in IAM Identity Center, or you can connect and synchronize to a set of users and groups in your own identity source for use across all your AWS accounts and applications. For information about IAM Identity Center, see What is IAM Identity Center? in the AWS IAM Identity Center User Guide. IAM users and groups An IAM user is an identity within your AWS account that has specific permissions for a single person or application. Where possible, we recommend relying on temporary credentials instead of creating IAM users who have long-term credentials such as passwords and access keys. However, if you have specific use cases that require long-term credentials with IAM users, we recommend that you rotate access keys. For more information, see Rotate access keys regularly for use cases that require long- term credentials in the IAM User Guide. Authenticating with identities 26 AMB Access Bitcoin Developer Guide An IAM group is an identity that specifies a collection of IAM users. You can't sign in as a group. You can use groups to specify permissions for multiple users at a time. Groups make permissions easier to manage for large sets of users. For example, you could have a group named IAMAdmins and give that group permissions to administer IAM resources. Users are different from roles. A user is uniquely associated with one person or application, but a role is intended to be assumable by anyone who needs it. Users have permanent long-term credentials, but roles provide temporary credentials. To learn more, see Use cases for IAM users in the IAM User Guide. IAM roles An IAM role is an identity within your AWS account that has specific permissions. It is similar to an IAM user, but is not associated with a specific person. To temporarily assume an IAM role in the AWS Management Console, you can switch from a user to an IAM role (console). You can assume a role by calling an AWS CLI or AWS API operation or by using a custom URL. For more information about methods for using roles, see Methods to assume a role in the IAM User Guide. IAM roles with temporary credentials are useful in the following situations: • Federated user access – To assign permissions to a federated identity, you create a role and define permissions for the role. When a federated identity authenticates, the identity is associated with the role and is granted the permissions that are defined by the role. For information about roles for federation, see Create a role for a third-party identity provider (federation) in the IAM User Guide. If you use IAM Identity Center, you configure a permission set. To control what your identities can access after they authenticate, IAM Identity Center correlates the permission set to a role in IAM. For information about permissions sets, see Permission sets in the AWS IAM Identity Center User Guide. • Temporary IAM user permissions – An IAM user or role can assume an IAM role to temporarily take on different permissions for a specific task. • Cross-account access – You can use an IAM role to allow someone (a trusted principal) in a different account to access resources in your account. Roles are the primary way to grant cross- account access. However, with some AWS services, you can attach a policy directly |
amb-btc-dg-011 | amb-btc-dg.pdf | 11 | Identity Center correlates the permission set to a role in IAM. For information about permissions sets, see Permission sets in the AWS IAM Identity Center User Guide. • Temporary IAM user permissions – An IAM user or role can assume an IAM role to temporarily take on different permissions for a specific task. • Cross-account access – You can use an IAM role to allow someone (a trusted principal) in a different account to access resources in your account. Roles are the primary way to grant cross- account access. However, with some AWS services, you can attach a policy directly to a resource (instead of using a role as a proxy). To learn the difference between roles and resource-based policies for cross-account access, see Cross account resource access in IAM in the IAM User Guide. • Cross-service access – Some AWS services use features in other AWS services. For example, when you make a call in a service, it's common for that service to run applications in Amazon EC2 or Authenticating with identities 27 AMB Access Bitcoin Developer Guide store objects in Amazon S3. A service might do this using the calling principal's permissions, using a service role, or using a service-linked role. • Forward access sessions (FAS) – When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. • Service role – A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. • Service-linked role – A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. • Applications running on Amazon EC2 – You can use an IAM role to manage temporary credentials for applications that are running on an EC2 instance and making AWS CLI or AWS API requests. This is preferable to storing access keys within the EC2 instance. To assign an AWS role to an EC2 instance and make it available to all of its applications, you create an instance profile that is attached to the instance. An instance profile contains the role and enables programs that are running on the EC2 instance to get temporary credentials. For more information, see Use an IAM role to grant permissions to applications running on Amazon EC2 instances in the IAM User Guide. Managing access using policies You control access in AWS by creating policies and attaching them to AWS identities or resources. A policy is an object in AWS that, when associated with an identity or resource, defines their permissions. AWS evaluates these policies when a principal (user, root user, or role session) makes a request. Permissions in the policies determine whether the request is allowed or denied. Most policies are stored in AWS as JSON documents. For more information about the structure and contents of JSON policy documents, see Overview of JSON policies in the IAM User Guide. Managing access using policies 28 AMB Access Bitcoin Developer Guide Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. By default, users and roles have no permissions. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. IAM policies define permissions for an action regardless of the method that you use to perform the operation. For example, suppose that you have a policy that allows the iam:GetRole action. A user with that policy can get role information from the AWS Management Console, the AWS CLI, or the AWS API. Identity-based policies Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These |
amb-btc-dg-012 | amb-btc-dg.pdf | 12 | administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. IAM policies define permissions for an action regardless of the method that you use to perform the operation. For example, suppose that you have a policy that allows the iam:GetRole action. A user with that policy can get role information from the AWS Management Console, the AWS CLI, or the AWS API. Identity-based policies Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. Identity-based policies can be further categorized as inline policies or managed policies. Inline policies are embedded directly into a single user, group, or role. Managed policies are standalone policies that you can attach to multiple users, groups, and roles in your AWS account. Managed policies include AWS managed policies and customer managed policies. To learn how to choose between a managed policy or an inline policy, see Choose between managed policies and inline policies in the IAM User Guide. Resource-based policies Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must specify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. Resource-based policies are inline policies that are located in that service. You can't use AWS managed policies from IAM in a resource-based policy. Managing access using policies 29 AMB Access Bitcoin Access control lists (ACLs) Developer Guide Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. Amazon S3, AWS WAF, and Amazon VPC are examples of services that support ACLs. To learn more about ACLs, see Access control list (ACL) overview in the Amazon Simple Storage Service Developer Guide. Other policy types AWS supports additional, less-common policy types. These policy types can set the maximum permissions granted to you by the more common policy types. • Permissions boundaries – A permissions boundary is an advanced feature in which you set the maximum permissions that an identity-based policy can grant to an IAM entity (IAM user or role). You can set a permissions boundary for an entity. The resulting permissions are the intersection of an entity's identity-based policies and its permissions boundaries. Resource-based policies that specify the user or role in the Principal field are not limited by the permissions boundary. An explicit deny in any of these policies overrides the allow. For more information about permissions boundaries, see Permissions boundaries for IAM entities in the IAM User Guide. • Service control policies (SCPs) – SCPs are JSON policies that specify the maximum permissions for an organization or organizational unit (OU) in AWS Organizations. AWS Organizations is a service for grouping and centrally managing multiple AWS accounts that your business owns. If you enable all features in an organization, then you can apply service control policies (SCPs) to any or all of your accounts. The SCP limits permissions for entities in member accounts, including each AWS account root user. For more information about Organizations and SCPs, see Service control policies in the AWS Organizations User Guide. • Resource control policies (RCPs) – RCPs are JSON policies that you can use to set the maximum available permissions for resources in your accounts without updating the IAM policies attached to each resource that you own. The RCP limits permissions for resources in member accounts and can impact the effective permissions for identities, including the AWS account root user, regardless of whether they belong to your organization. For more information about Organizations and RCPs, including a list of AWS services that support RCPs, see Resource control policies (RCPs) in the AWS Organizations User Guide. • Session policies – Session policies are advanced policies that you pass as a parameter when you programmatically create a temporary session for a role or federated user. The resulting session's Managing access using policies 30 AMB Access Bitcoin Developer Guide permissions are the intersection of the user or role's identity-based policies and the session policies. Permissions can also come from a resource-based policy. An explicit deny |
amb-btc-dg-013 | amb-btc-dg.pdf | 13 | whether they belong to your organization. For more information about Organizations and RCPs, including a list of AWS services that support RCPs, see Resource control policies (RCPs) in the AWS Organizations User Guide. • Session policies – Session policies are advanced policies that you pass as a parameter when you programmatically create a temporary session for a role or federated user. The resulting session's Managing access using policies 30 AMB Access Bitcoin Developer Guide permissions are the intersection of the user or role's identity-based policies and the session policies. Permissions can also come from a resource-based policy. An explicit deny in any of these policies overrides the allow. For more information, see Session policies in the IAM User Guide. Multiple policy types When multiple types of policies apply to a request, the resulting permissions are more complicated to understand. To learn how AWS determines whether to allow a request when multiple policy types are involved, see Policy evaluation logic in the IAM User Guide. How Amazon Managed Blockchain (AMB) Access Bitcoin works with IAM Before you use IAM to manage access to AMB Access Bitcoin, learn what IAM features are available to use with AMB Access Bitcoin. IAM features you can use with Amazon Managed Blockchain (AMB) Access Bitcoin IAM feature AMB Access Bitcoin support Identity-based policies Resource-based policies Policy actions Policy resources Policy condition keys ACLs ABAC (tags in policies) Temporary credentials Principal permissions Service roles Service-linked roles Yes No Yes No No No No No No No No How Amazon Managed Blockchain (AMB) Access Bitcoin works with IAM 31 AMB Access Bitcoin Developer Guide To get a high-level view of how AMB Access Bitcoin and other AWS services work with most IAM features, see AWS services that work with IAM in the IAM User Guide. Identity-based policies for AMB Access Bitcoin Supports identity-based policies: Yes Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. You can't specify the principal in an identity-based policy because it applies to the user or role to which it is attached. To learn about all of the elements that you can use in a JSON policy, see IAM JSON policy elements reference in the IAM User Guide. Identity-based policy examples for AMB Access Bitcoin To view examples of AMB Access Bitcoin identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Bitcoin. Resource-based policies within AMB Access Bitcoin Supports resource-based policies: No Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must specify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. To enable cross-account access, you can specify an entire account or IAM entities in another account as the principal in a resource-based policy. Adding a cross-account principal to a resource- based policy is only half of establishing the trust relationship. When the principal and the resource are in different AWS accounts, an IAM administrator in the trusted account must also grant How Amazon Managed Blockchain (AMB) Access Bitcoin works with IAM 32 AMB Access Bitcoin Developer Guide the principal entity (user or role) permission to access the resource. They grant permission by attaching an identity-based policy to the entity. However, if a resource-based policy grants access to a principal in the same account, no additional identity-based policy is required. For more information, see Cross account resource access in IAM in the IAM User Guide. Policy actions for AMB Access Bitcoin Supports policy actions: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Action element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated AWS API operation. There are some exceptions, such as permission-only actions that don't have a matching API operation. There are also some operations that require multiple actions in |
amb-btc-dg-014 | amb-btc-dg.pdf | 14 | IAM User Guide. Policy actions for AMB Access Bitcoin Supports policy actions: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Action element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated AWS API operation. There are some exceptions, such as permission-only actions that don't have a matching API operation. There are also some operations that require multiple actions in a policy. These additional actions are called dependent actions. Include actions in a policy to grant permissions to perform the associated operation. To see a list of AMB Access Bitcoin actions, see Actions Defined by Amazon Managed Blockchain (AMB) Access Bitcoin in the Service Authorization Reference. Policy actions in AMB Access Bitcoin use the following prefix before the action: managedblockchain: To specify multiple actions in a single statement, separate them with commas. "Action": [ "managedblockchain::action1", "managedblockchain::action2" ] You can specify multiple actions using wildcards (*). For example, to specify all actions that begin with the word InvokeRpcBitcoin, include the following action: "Action": "managedblockchain::InvokeRpcBitcoin*" How Amazon Managed Blockchain (AMB) Access Bitcoin works with IAM 33 AMB Access Bitcoin Developer Guide To view examples of AMB Access Bitcoin identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Bitcoin. Policy resources for AMB Access Bitcoin Supports policy resources: No Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Resource JSON policy element specifies the object or objects to which the action applies. Statements must include either a Resource or a NotResource element. As a best practice, specify a resource using its Amazon Resource Name (ARN). You can do this for actions that support a specific resource type, known as resource-level permissions. For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to indicate that the statement applies to all resources. "Resource": "*" To see a list of AMB Access Bitcoin resource types and their ARNs, see Resources Defined by Amazon Managed Blockchain (AMB) Access Bitcoin in the Service Authorization Reference. To learn with which actions you can specify the ARN of each resource, see Actions Defined by Amazon Managed Blockchain (AMB) Access Bitcoin . To view examples of AMB Access Bitcoin identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Bitcoin. Policy condition keys for AMB Access Bitcoin Supports service-specific policy condition keys: No Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Condition element (or Condition block) lets you specify conditions in which a statement is in effect. The Condition element is optional. You can create conditional expressions that use How Amazon Managed Blockchain (AMB) Access Bitcoin works with IAM 34 AMB Access Bitcoin Developer Guide condition operators, such as equals or less than, to match the condition in the policy with values in the request. If you specify multiple Condition elements in a statement, or multiple keys in a single Condition element, AWS evaluates them using a logical AND operation. If you specify multiple values for a single condition key, AWS evaluates the condition using a logical OR operation. All of the conditions must be met before the statement's permissions are granted. You can also use placeholder variables when you specify conditions. For example, you can grant an IAM user permission to access a resource only if it is tagged with their IAM user name. For more information, see IAM policy elements: variables and tags in the IAM User Guide. AWS supports global condition keys and service-specific condition keys. To see all AWS global condition keys, see AWS global condition context keys in the IAM User Guide. To see a list of AMB Access Bitcoin condition keys, see Condition Keys for Amazon Managed Blockchain (AMB) Access Bitcoin in the Service Authorization Reference. To learn with which actions and resources you can use a condition key, see Actions Defined by Amazon Managed Blockchain (AMB) Access Bitcoin . To view examples of AMB Access Bitcoin identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Bitcoin. ACLs in AMB Access Bitcoin Supports ACLs: No Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. ABAC with AMB Access Bitcoin Supports ABAC (tags in policies): No Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on |
amb-btc-dg-015 | amb-btc-dg.pdf | 15 | a condition key, see Actions Defined by Amazon Managed Blockchain (AMB) Access Bitcoin . To view examples of AMB Access Bitcoin identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Bitcoin. ACLs in AMB Access Bitcoin Supports ACLs: No Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. ABAC with AMB Access Bitcoin Supports ABAC (tags in policies): No Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes. In AWS, these attributes are called tags. You can attach tags to IAM entities (users or roles) and to many AWS resources. Tagging entities and resources is the first step of ABAC. Then you design ABAC policies to allow operations when the principal's tag matches the tag on the resource that they are trying to access. How Amazon Managed Blockchain (AMB) Access Bitcoin works with IAM 35 AMB Access Bitcoin Developer Guide ABAC is helpful in environments that are growing rapidly and helps with situations where policy management becomes cumbersome. To control access based on tags, you provide tag information in the condition element of a policy using the aws:ResourceTag/key-name, aws:RequestTag/key-name, or aws:TagKeys condition keys. If a service supports all three condition keys for every resource type, then the value is Yes for the service. If a service supports all three condition keys for only some resource types, then the value is Partial. For more information about ABAC, see Define permissions with ABAC authorization in the IAM User Guide. To view a tutorial with steps for setting up ABAC, see Use attribute-based access control (ABAC) in the IAM User Guide. Using temporary credentials with AMB Access Bitcoin Supports temporary credentials: No Some AWS services don't work when you sign in using temporary credentials. For additional information, including which AWS services work with temporary credentials, see AWS services that work with IAM in the IAM User Guide. You are using temporary credentials if you sign in to the AWS Management Console using any method except a user name and password. For example, when you access AWS using your company's single sign-on (SSO) link, that process automatically creates temporary credentials. You also automatically create temporary credentials when you sign in to the console as a user and then switch roles. For more information about switching roles, see Switch from a user to an IAM role (console) in the IAM User Guide. You can manually create temporary credentials using the AWS CLI or AWS API. You can then use those temporary credentials to access AWS. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, see Temporary security credentials in IAM. Cross-service principal permissions for AMB Access Bitcoin Supports forward access sessions (FAS): No When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a How Amazon Managed Blockchain (AMB) Access Bitcoin works with IAM 36 AMB Access Bitcoin Developer Guide different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. Service roles for AMB Access Bitcoin Supports service roles: No A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. Warning Changing the permissions for a service role might break AMB Access Bitcoin functionality. Edit service roles only when AMB Access Bitcoin provides guidance to do so. Service-linked roles for AMB Access Bitcoin Supports service-linked roles: No A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. For details about creating or managing service-linked roles, see AWS services that work with IAM. Find a service in the table that includes a Yes in the Service-linked role column. Choose the Yes link to view the service-linked role documentation for that service. Identity-based policy examples for Amazon Managed |
amb-btc-dg-016 | amb-btc-dg.pdf | 16 | a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. For details about creating or managing service-linked roles, see AWS services that work with IAM. Find a service in the table that includes a Yes in the Service-linked role column. Choose the Yes link to view the service-linked role documentation for that service. Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Bitcoin By default, users and roles don't have permission to create or modify AMB Access Bitcoin resources. They also can't perform tasks by using the AWS Management Console, AWS Command Line Identity-based policy examples 37 AMB Access Bitcoin Developer Guide Interface (AWS CLI), or AWS API. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. To learn how to create an IAM identity-based policy by using these example JSON policy documents, see Create IAM policies (console) in the IAM User Guide. For details about actions and resource types defined by AMB Access Bitcoin, including the format of the ARNs for each of the resource types, see Actions, Resources, and Condition Keys for Amazon Managed Blockchain (AMB) Access Bitcoin in the Service Authorization Reference. Topics • Policy best practices • Using the AMB Access Bitcoin console • Allow users to view their own permissions • Accessing Bitcoin networks Policy best practices Identity-based policies determine whether someone can create, access, or delete AMB Access Bitcoin resources in your account. These actions can incur costs for your AWS account. When you create or edit identity-based policies, follow these guidelines and recommendations: • Get started with AWS managed policies and move toward least-privilege permissions – To get started granting permissions to your users and workloads, use the AWS managed policies that grant permissions for many common use cases. They are available in your AWS account. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases. For more information, see AWS managed policies or AWS managed policies for job functions in the IAM User Guide. • Apply least-privilege permissions – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as least-privilege permissions. For more information about using IAM to apply permissions, see Policies and permissions in IAM in the IAM User Guide. • Use conditions in IAM policies to further restrict access – You can add a condition to your policies to limit access to actions and resources. For example, you can write a policy condition to Identity-based policy examples 38 AMB Access Bitcoin Developer Guide specify that all requests must be sent using SSL. You can also use conditions to grant access to service actions if they are used through a specific AWS service, such as AWS CloudFormation. For more information, see IAM JSON policy elements: Condition in the IAM User Guide. • Use IAM Access Analyzer to validate your IAM policies to ensure secure and functional permissions – IAM Access Analyzer validates new and existing policies so that the policies adhere to the IAM policy language (JSON) and IAM best practices. IAM Access Analyzer provides more than 100 policy checks and actionable recommendations to help you author secure and functional policies. For more information, see Validate policies with IAM Access Analyzer in the IAM User Guide. • Require multi-factor authentication (MFA) – If you have a scenario that requires IAM users or a root user in your AWS account, turn on MFA for additional security. To require MFA when API operations are called, add MFA conditions to your policies. For more information, see Secure API access with MFA in the IAM User Guide. For more information about best practices in IAM, see Security best practices in IAM in the IAM User Guide. Using the AMB Access Bitcoin console To access the Amazon Managed Blockchain (AMB) Access Bitcoin console, you must have a minimum set of permissions. These permissions must allow you to list and view details about the AMB Access Bitcoin resources in your AWS account. If you create an identity-based policy that is more restrictive than the minimum required permissions, the console won't function as intended for entities (users or roles) with that policy. You don't need to allow minimum console permissions for users that are making calls only to the AWS CLI or the AWS |
amb-btc-dg-017 | amb-btc-dg.pdf | 17 | in the IAM User Guide. Using the AMB Access Bitcoin console To access the Amazon Managed Blockchain (AMB) Access Bitcoin console, you must have a minimum set of permissions. These permissions must allow you to list and view details about the AMB Access Bitcoin resources in your AWS account. If you create an identity-based policy that is more restrictive than the minimum required permissions, the console won't function as intended for entities (users or roles) with that policy. You don't need to allow minimum console permissions for users that are making calls only to the AWS CLI or the AWS API. Instead, allow access to only the actions that match the API operation that they're trying to perform. To ensure that users and roles can still use the AMB Access Bitcoin console, also attach the AMB Access Bitcoin ConsoleAccess or ReadOnly AWS managed policy to the entities. For more information, see Adding permissions to a user in the IAM User Guide. Allow users to view their own permissions This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API. Identity-based policy examples 39 AMB Access Bitcoin Developer Guide { "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": ["arn:aws:iam::*:user/${aws:username}"] }, { "Sid": "NavigateInConsole", "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", "iam:GetPolicy", "iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } ] } Accessing Bitcoin networks Note In order to access the public endpoints for the Bitcoin mainnet and testnet to make JSON-RPC calls, you will need user credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) that have the appropriate IAM permissions for AMB Access Bitcoin. Identity-based policy examples 40 AMB Access Bitcoin Developer Guide Example IAM Policy to access all Bitcoin Networks This example grants an IAM user in your AWS account access to all the Bitcoin networks. { "Version": "2012-10-17", "Statement": [ { "Sid": "AccessAllBitcoinNetworks", "Effect": "Allow", "Action": [ "managedblockchain:InvokeRpcBitcoin*" ], "Resource": "*" } ] } Example IAM Policy to access the Bitcoin Testnet network This example grants an IAM user in your AWS account access to the Bitcoin testnet network. { "Version": "2012-10-17", "Statement": [ { "Sid": "AccessBitcoinTestnet", "Effect": "Allow", "Action": [ "managedblockchain:InvokeRpcBitcoinTestnet" ], "Resource": "*" } ] } Identity-based policy examples 41 AMB Access Bitcoin Developer Guide Troubleshooting Amazon Managed Blockchain (AMB) Access Bitcoin identity and access Use the following information to help you diagnose and fix common issues that you might encounter when working with AMB Access Bitcoin and IAM. Topics • I am not authorized to perform an action in AMB Access Bitcoin • I am not authorized to perform iam:PassRole • I want to allow people outside of my AWS account to access my AMB Access Bitcoin resources I am not authorized to perform an action in AMB Access Bitcoin If you receive an error that you're not authorized to perform an action, your policies must be updated to allow you to perform the action. The following example error occurs when the mateojackson IAM user tries to use the console to view details about a fictional my-example-widget resource but doesn't have the fictional managedblockchain::GetWidget permissions. User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: managedblockchain::GetWidget on resource: my-example-widget In this case, the policy for the mateojackson user must be updated to allow access to the my- example-widget resource by using the managedblockchain::GetWidget action. If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. I am not authorized to perform iam:PassRole If you receive an error that you're not authorized to perform the iam:PassRole action, your policies must be updated to allow you to pass a role to AMB Access Bitcoin. Some AWS services allow you to pass an existing role to that service instead of creating a new service role or service-linked role. To do this, you must have permissions to pass the role to the service. Troubleshooting 42 AMB Access Bitcoin Developer Guide The following example error occurs when an IAM user named marymajor tries to use the console to perform an action in AMB Access Bitcoin. However, the action requires the service to have permissions that are granted by a service role. Mary does not have permissions to pass the role to the service. User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole In this case, Mary's policies must be updated to allow her to perform the iam:PassRole action. If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. I want to allow people outside of my AWS account to access my AMB Access Bitcoin |
amb-btc-dg-018 | amb-btc-dg.pdf | 18 | to use the console to perform an action in AMB Access Bitcoin. However, the action requires the service to have permissions that are granted by a service role. Mary does not have permissions to pass the role to the service. User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole In this case, Mary's policies must be updated to allow her to perform the iam:PassRole action. If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. I want to allow people outside of my AWS account to access my AMB Access Bitcoin resources You can create a role that users in other accounts or people outside of your organization can use to access your resources. You can specify who is trusted to assume the role. For services that support resource-based policies or access control lists (ACLs), you can use those policies to grant people access to your resources. To learn more, consult the following: • To learn whether AMB Access Bitcoin supports these features, see How Amazon Managed Blockchain (AMB) Access Bitcoin works with IAM. • To learn how to provide access to your resources across AWS accounts that you own, see Providing access to an IAM user in another AWS account that you own in the IAM User Guide. • To learn how to provide access to your resources to third-party AWS accounts, see Providing access to AWS accounts owned by third parties in the IAM User Guide. • To learn how to provide access through identity federation, see Providing access to externally authenticated users (identity federation) in the IAM User Guide. • To learn the difference between using roles and resource-based policies for cross-account access, see Cross account resource access in IAM in the IAM User Guide. Troubleshooting 43 AMB Access Bitcoin Developer Guide Logging Amazon Managed Blockchain (AMB) Access Bitcoin events by using AWS CloudTrail Note Amazon Managed Blockchain (AMB) Access Bitcoin doesn’t support management events. Amazon Managed Blockchain is integrated with AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in Managed Blockchain. CloudTrail captures who invoked the AMB Access Bitcoin endpoints for Managed Blockchain as data plane events. If you create a properly configured trail that is subscribed to receive the desired data plane events, you can receive continuous delivery of AMB Access Bitcoin-related CloudTrail events to an Amazon S3 bucket. Using the information that's collected by CloudTrail, you can determine that a request was made to one of the AMB Access Bitcoin endpoints, the IP address that the request came from, who made the request, when it was made, and other additional details. To learn more about CloudTrail, see the AWS CloudTrail User Guide. AMB Access Bitcoin information in CloudTrail AWS CloudTrail is enabled by default when you create your AWS account. However, to see who invoked the AMB Access Bitcoin endpoints, you must configure CloudTrail to log data plane events. To keep an ongoing record of events in your AWS account, including the data plane events for AMB Access Bitcoin, you must create a trail. A trail makes CloudTrail deliver log files to an Amazon S3 bucket. By default, when you create a trail in the AWS Management Console, the trail applies to all AWS Regions. The trail logs events from all supported Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify. Additionally, you can configure other AWS services to analyze this data further and act on the events data collected in the CloudTrail logs. For more information, see the following: • Using CloudTrail to track Bitcoin JSON-RPCs • Overview for creating a trail • CloudTrail supported services and integrations AMB Access Bitcoin information in CloudTrail 44 AMB Access Bitcoin Developer Guide • Configuring Amazon SNS notifications for CloudTrail • Receiving CloudTrail log files from multiple regions and Receiving CloudTrail log files from multiple accounts By analyzing the CloudTrail data events, you can monitor who invoked the AMB Access Bitcoin endpoints. Every event or log entry contains information about who generated the request. The identity information helps you determine the following: • Whether the request was made with root or AWS Identity and Access Management (IAM) user credentials. • Whether the request was made with temporary security credentials for a role or a federated user. • Whether the request was made by another AWS service. For more information, see the CloudTrail userIdentity element. Understanding AMB Access Bitcoin log file entries For data plane events, a trail is a configuration that enables delivery of events as log files to a specified S3 bucket. Each CloudTrail log file contains one or more log entries that represent a single request from any source. These entries provide details about the |
amb-btc-dg-019 | amb-btc-dg.pdf | 19 | made with root or AWS Identity and Access Management (IAM) user credentials. • Whether the request was made with temporary security credentials for a role or a federated user. • Whether the request was made by another AWS service. For more information, see the CloudTrail userIdentity element. Understanding AMB Access Bitcoin log file entries For data plane events, a trail is a configuration that enables delivery of events as log files to a specified S3 bucket. Each CloudTrail log file contains one or more log entries that represent a single request from any source. These entries provide details about the requested action, including the date and time of the action, and any associated request parameters. Note CloudTrail data events in the log files aren't an ordered stack trace of the AMB Access Bitcoin API calls, so they don't appear in any specific order. Using CloudTrail to track Bitcoin JSON-RPCs You can use CloudTrail to track who in your account invoked the AMB Access Bitcoin endpoints and what JSON-RPC was invoked as data events. By default, when you create a trail, data events aren't logged. To record who invoked the AMB Access Bitcoin endpoints as CloudTrail data events, you must explicitly add the supported resources or resource types for which you want to collect Understanding AMB Access Bitcoin log file entries 45 AMB Access Bitcoin Developer Guide activity to a trail. Amazon Managed Blockchain supports adding data events by using the AWS Management Console, AWS SDK, and AWS CLI. For more information, see Log events by using advanced selectors in the AWS CloudTrail User Guide . To log data events in a trail, use the put-event-selectors operation after you create the trail. Use the --advanced-event-selectors option to specify the AWS::ManagedBlockchain::Network resource types in order to start logging data events to determine who invoked the AMB Access Bitcoin endpoints. Example Data event log entry of all your account's AMB Access Bitcoin endpoints requests The following example demonstrates how to use the put-event-selectors operation to log all your account's AMB Access Bitcoin endpoint requests for the trail my-bitcoin-trail in the us- east-1 Region. aws cloudtrail put-event-selectors \ --region us-east-1 \ --trail-name my-bitcoin-trail \ --advanced-event-selectors '[{ "Name": "Test", "FieldSelectors": [ { "Field": "eventCategory", "Equals": ["Data"] }, { "Field": "resources.type", "Equals": ["AWS::ManagedBlockchain::Network"] } ]}]' After you subscribe, you can track usage in the S3 bucket that is connected to the trail specified in the previous example. The following result shows a CloudTrail data event log entry of the information that's collected by CloudTrail. You can determine that a Bitcoin JSON-RPC request was made to one of the AMB Access Bitcoin endpoints, the IP address that the request came from, who made the request, when it was made, and other additional details. { "eventVersion": "1.08", "userIdentity": { "type": "AssumedRole", "principalId": "AROA554UO62RJ7KSB7FAX:777777777777", "arn": "arn:aws:sts::111122223333:assumed-role/Admin/777777777777", "accountId": "111122223333" }, Using CloudTrail to track Bitcoin JSON-RPCs 46 AMB Access Bitcoin Developer Guide "eventTime": "2023-04-12T19:00:22Z", "eventSource": "managedblockchain.amazonaws.com", "eventName": "getblock", "awsRegion": "us-east-1", "sourceIPAddress": "111.222.333.444", "userAgent": "python-requests/2.28.1", "errorCode": "-", "errorMessage": "-", "requestParameters": { "jsonrpc": "2.0", "method": "getblock", "params": [], "id": 1 }, "responseElements": null, "requestID": "DRznHHEjIAMFSzA=", "eventID": "baeb232d-2c6b-46cd-992c-0e4033aace86", "readOnly": true, "resources": [{ "type": "AWS::ManagedBlockchain::Network", "ARN": "arn:aws:managedblockchain:::networks/n-bitcoin-mainnet" }], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "111122223333", "eventCategory": "Data" } Using CloudTrail to track Bitcoin JSON-RPCs 47 |
amb-polygon-dg-001 | amb-polygon-dg.pdf | 1 | Developer Guide AMB Access Polygon Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. AMB Access Polygon Developer Guide AMB Access Polygon: Developer Guide Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. AMB Access Polygon Table of Contents Developer Guide .......................................................................................................................................................... v About AMB Access Polygon ............................................................................................................ 1 Resources for first-time AMB Access Polygon users .............................................................................. 1 Key concepts .................................................................................................................................... 2 Considerations and limitations .................................................................................................................. 3 Setting up ........................................................................................................................................ 5 Prerequisites for using AMB Access Polygon .......................................................................................... 5 Sign up for AWS ...................................................................................................................................... 5 Create an IAM user with appropriate permissions ................................................................................ 6 Install and configure the AWS Command Line Interface ..................................................................... 6 Getting started ................................................................................................................................ 7 Create an IAM policy ................................................................................................................................... 7 Console RPC example .................................................................................................................................. 8 awscurl RPC example ................................................................................................................................ 9 Node.js RPC example ................................................................................................................................. 10 Send transaction ................................................................................................................................... 15 Read transaction ................................................................................................................................... 17 Token based access ........................................................................................................................ 19 Creating an Accessor token for token-based access ........................................................................... 19 Viewing an Accessor token details ......................................................................................................... 21 Deleting an Accessor token ...................................................................................................................... 22 JSON-RPC and API ......................................................................................................................... 23 Polygon use cases .......................................................................................................................... 33 Analyze Polygon NFT data ....................................................................................................................... 33 Support NFT purchases ............................................................................................................................ 33 Create a Polygon wallet ........................................................................................................................... 34 Wallet as a service ..................................................................................................................................... 34 Token-gated experiences .......................................................................................................................... 34 Tutorials ......................................................................................................................................... 35 Security .......................................................................................................................................... 36 Data protection ........................................................................................................................................... 37 Data encryption ..................................................................................................................................... 38 Encryption in transit ............................................................................................................................ 38 Identity and access management ........................................................................................................... 38 iii AMB Access Polygon Developer Guide Audience .................................................................................................................................................. 38 Authenticating with identities ............................................................................................................ 39 Managing access using policies .......................................................................................................... 42 How Amazon Managed Blockchain (AMB) Access Polygon works with IAM .............................. 45 Identity-based policy examples ......................................................................................................... 51 Troubleshooting .................................................................................................................................... 56 CloudTrail logs ............................................................................................................................... 58 AMB Access Polygon information in CloudTrail ................................................................................... 58 Understanding AMB Access Polygon log file entries .......................................................................... 59 Using CloudTrail to track Polygon JSON-RPCs ............................................................................... 59 Document history .......................................................................................................................... 62 iv AMB Access Polygon Developer Guide Amazon Managed Blockchain (AMB) Access Polygon is in preview release and is subject to change. v AMB Access Polygon Developer Guide What is Amazon Managed Blockchain (AMB) Access Polygon? Amazon Managed Blockchain (AMB) Access Polygon is a fully managed service that helps you build resilient Web3 applications on the Polygon blockchain. AMB Access Polygon provides instant and serverless access to the Polygon blockchain. Polygon is a scaling solution that uses the Ethereum Virtual Machine (EVM) as the foundation. The Polygon blockchain is known for high transaction throughput and low transaction fees. The Polygon blockchain uses a proof-of-stake consensus mechanism. Polygon is commonly used in building decentralized applications (dApps) related to NFTs, Web3 games, and tokenization use cases, among others. This guide covers how to create and manage Polygon blockchain resources using Amazon Managed Blockchain (AMB) Access Polygon. Resources for first-time AMB Access Polygon users If this is your first time using AMB Access Polygon, we recommend that you begin by reading the following sections: • Key concepts: Amazon Managed Blockchain (AMB) Access Polygon • Getting started with Amazon Managed Blockchain (AMB) Access Polygon • Managed Blockchain API and the JSON-RPCs supported with AMB Access Polygon Resources for first-time AMB Access Polygon users 1 AMB Access Polygon Developer Guide Key concepts: Amazon Managed Blockchain (AMB) Access Polygon Note This guide assumes that you're familiar with the concepts that are essential to Polygon. These concepts include staking, dApps, transactions, wallets, smart contracts, Polygon (POL, formerly MATIC), and others. Before using Amazon Managed Blockchain (AMB) Access Polygon, we recommend that you review the Polygon Development Documentation and the Polygon wiki. Amazon Managed Blockchain (AMB) Access Polygon provides you with serverless access to the Polygon Mainnet and Polygon Mainnet networks, without requiring you to provision and manage any Polygon infrastructure, including nodes. Polygon nodes on a network collectively store a Polygon blockchain state, verify transactions, and participate in consensus to change a blockchain state. You can use this managed service to access the Polygon networks quickly and on demand, reducing your overall cost of ownership. With AMB Access Polygon, you have access to JSON Remote Procedure (JSON-RPC) calls. You can invoke Polygon JSON-RPCs to communicate with the Polygon blockchain through nodes managed by Managed Blockchain. You can use the AMB Access Polygon service to develop and use decentralized applications (dApps) that interact with the Polygon blockchain. An integral part of dApps are smart contracts. You can create and deploy smart contracts into the Polygon blockchain using AMB Access Polygon. You can also check |
amb-polygon-dg-002 | amb-polygon-dg.pdf | 2 | state. You can use this managed service to access the Polygon networks quickly and on demand, reducing your overall cost of ownership. With AMB Access Polygon, you have access to JSON Remote Procedure (JSON-RPC) calls. You can invoke Polygon JSON-RPCs to communicate with the Polygon blockchain through nodes managed by Managed Blockchain. You can use the AMB Access Polygon service to develop and use decentralized applications (dApps) that interact with the Polygon blockchain. An integral part of dApps are smart contracts. You can create and deploy smart contracts into the Polygon blockchain using AMB Access Polygon. You can also check balances for your wallets, transaction details, estimate fees, and so on, by invoking JSON-RPCs against AMB Access Polygon endpoints that run in a decentralized way across all the nodes that are peers to the Polygon network. Any peer to the Polygon network can develop and deploy a smart contract. Important You are responsible for creating, maintaining, using, and managing your Polygon addresses. You are also responsible for the contents of your Polygon addresses. AWS is not responsible for any transactions deployed or called using Polygon nodes on Amazon Managed Blockchain. 2 AMB Access Polygon Developer Guide Considerations and limitations for using Amazon Managed Blockchain (AMB) Access Polygon When you use Amazon Managed Blockchain (AMB) Access Polygon, consider the following: • Supported Polygon networks AMB Access Polygon supports the following public networks: • Mainnet—The public Polygon blockchain secured by proof-of-stake consensus, and on which the Polygon (POL) token is issued and transacted. Transactions on Mainnet have actual value (that is, they incur real costs) and are recorded on the public blockchain. • Networks no longer supported by Polygon • As communicated by Polygon Labs, the Mumbai Testnet network will sunset in mid-April. In line with this news, AMB Access Polygon ended support of the Mumbai Testnet on April 15, 2024. We recommend using Amoy Testnet for your testing workload. • Private networks are not supported. • Furthermore, AMB Access Polygon does not include support for the Polygon zkEVM network. • Compatibility with popular third-party programming libraries AMB Access Polygon is compatible with popular programming libraries, such as ethers.js, allowing developers to interact with the Polygon blockchain using familiar tools to integrate easily with their existing implementations or develop new applications quickly. • Supported Regions This service is supported only in the US East (N. Virginia) Region. • Service endpoints The following are the service endpoints for AMB Access Polygon. To connect with the service, you must use an endpoint that includes one of the supported Regions. • mainnet.polygon.managedblockchain.us-east-1.amazonaws.com • Staking not supported AMB Access Polygon does not support Polygon (POL) validator nodes for proof-of-stake. • Signature Version 4 signing of Polygon JSON-RPC requests Considerations and limitations 3 AMB Access Polygon Developer Guide When making calls to the Polygon JSON-RPCs on Amazon Managed Blockchain, you can do so over an HTTPS connection authenticated using the Signature Version 4 signing process. This means that only authorized IAM principals in the AWS account can make Polygon JSON-RPC calls. To do this, AWS credentials (an access key ID and a secret access key) must be provided with the call. Important • Do not embed client credentials in user-facing applications. • You cannot use IAM policies to restrict access to individual Polygon JSON-RPCs. • Support for Token Based Access You can also use Accessor tokens to make JSON-RPC calls to the Polygon network endpoints as a convenient alternative to the Signature Version 4 (SigV4) signing process. You must provide a BILLING_TOKEN from one of the Accessor tokens you create and add as a parameter with your calls. Important • If you prioritize security and auditability over convenience, use the SigV4 signing process instead. • You can access the Polygon JSON-RPCs using Signature Version 4 (SigV4) and token- based access. However, if you choose to use both protocols, your request is rejected. • You must never embed Accessor tokens in user-facing applications. • Only submissions of raw transactions are supported Use the eth_sendrawtransaction JSON-RPC to submit transactions that update the Polygon blockchain state. Considerations and limitations 4 AMB Access Polygon Developer Guide Setting up Amazon Managed Blockchain (AMB) Access Polygon Before you use Amazon Managed Blockchain (AMB) Access Polygon for the first time, follow the steps in this section to create an AWS account. The following chapter discusses how to start using AMB Access Polygon. Prerequisites for using AMB Access Polygon Before you use AWS for the first time, you must have an AWS account. Sign up for AWS When you sign up for AWS, your AWS account is automatically signed up for all AWS services, including Amazon Managed Blockchain (AMB) Access Polygon. You're charged only for the services that you use. If you have an AWS account already, go to the next step. If you don't |
amb-polygon-dg-003 | amb-polygon-dg.pdf | 3 | Access Polygon for the first time, follow the steps in this section to create an AWS account. The following chapter discusses how to start using AMB Access Polygon. Prerequisites for using AMB Access Polygon Before you use AWS for the first time, you must have an AWS account. Sign up for AWS When you sign up for AWS, your AWS account is automatically signed up for all AWS services, including Amazon Managed Blockchain (AMB) Access Polygon. You're charged only for the services that you use. If you have an AWS account already, go to the next step. If you don't have an AWS account, use the following procedure to create one. To create an AWS account 1. Open https://portal.aws.amazon.com/billing/signup. 2. Follow the online instructions. Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad. When you sign up for an AWS account, an AWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform tasks that require root user access. Prerequisites for using AMB Access Polygon 5 AMB Access Polygon Developer Guide Create an IAM user with appropriate permissions To create and work with AMB Access Polygon, you must have an AWS Identity and Access Management (IAM) principal (user or group) with permissions that allow necessary Managed Blockchain actions. When making calls to the Polygon JSON-RPCs on Amazon Managed Blockchain, you can do so over an HTTPS connection authenticated using the Signature Version 4 signing process. This means that only authorized IAM principals in the AWS account can make Polygon JSON-RPC calls. To do this, AWS credentials (an access key ID and a secret access key) must be provided with the call. You can also use Accessor tokens to make JSON-RPC calls to the Polygon network endpoints as a convenient alternative to the Signature Version 4 (SigV4) signing process. You must provide a BILLING_TOKEN from one of the Accessor tokens you create and add as a parameter with your calls. However, you still need IAM access to get permissions to create Accessor tokens using the AWS Management Console, AWS CLI, and SDK. For information about how to create an IAM user, see Creating an IAM user in your AWS account. For more information about how to attach a permissions policy to a user, see Changing permissions for an IAM user. For an example of a permissions policy that you can use to give a user permission to work with AMB Access Polygon, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Polygon. Install and configure the AWS Command Line Interface If you have not already done so, install the latest AWS Command Line Interface (AWS CLI) to work with AWS resources from a terminal. For more information, see Installing or updating the latest version of the AWS CLI. Note For CLI access, you need an access key ID and a secret access key. Use temporary credentials instead of long-term access keys when possible. Temporary credentials include an access key ID, a secret access key, and a security token that indicates when the credentials expire. For more information, see Using temporary credentials with AWS resources in the IAM User Guide. Create an IAM user with appropriate permissions 6 AMB Access Polygon Developer Guide Getting started with Amazon Managed Blockchain (AMB) Access Polygon Get started with Amazon Managed Blockchain (AMB) Access Polygon by using the information and procedures in this section. Topics • Create an IAM policy to access the Polygon blockchain network • Make Polygon remote procedure call (RPC) requests on the AMB Access RPC editor using the AWS Management Console • Make AMB Access Polygon JSON-RPC requests in awscurl by using the AWS CLI • Make Polygon JSON-RPC requests in Node.js Create an IAM policy to access the Polygon blockchain network To access the public endpoint for the Polygon Mainnet to make JSON-RPC calls, you must have user credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) that have the appropriate IAM permissions for Amazon Managed Blockchain (AMB) Access Polygon. In a terminal with the AWS CLI installed, run the following command to create an IAM policy to access both Polygon endpoints: cat <<EOT > ~/amb-polygon-access-policy.json { "Version": "2012-10-17", "Statement": [ { "Sid" : "AMBPolygonAccessPolicy", "Effect": "Allow", "Action": [ "managedblockchain:InvokeRpcPolygon*" ], "Resource": "*" } ] } EOT Create an IAM policy 7 AMB Access Polygon Developer Guide aws iam create-policy --policy-name AmazonManagedBlockchainPolygonAccess --policy- document file://$HOME/amb-polygon-access-policy.json Note The previous example gives you access to all available Polygon networks. To get access to a specific endpoint, use the following Action command: • "managedblockchain:InvokeRpcPolygonMainnet" After you create the policy, attach that policy to your IAM user’s role for it to |
amb-polygon-dg-004 | amb-polygon-dg.pdf | 4 | installed, run the following command to create an IAM policy to access both Polygon endpoints: cat <<EOT > ~/amb-polygon-access-policy.json { "Version": "2012-10-17", "Statement": [ { "Sid" : "AMBPolygonAccessPolicy", "Effect": "Allow", "Action": [ "managedblockchain:InvokeRpcPolygon*" ], "Resource": "*" } ] } EOT Create an IAM policy 7 AMB Access Polygon Developer Guide aws iam create-policy --policy-name AmazonManagedBlockchainPolygonAccess --policy- document file://$HOME/amb-polygon-access-policy.json Note The previous example gives you access to all available Polygon networks. To get access to a specific endpoint, use the following Action command: • "managedblockchain:InvokeRpcPolygonMainnet" After you create the policy, attach that policy to your IAM user’s role for it to take effect. In the AWS Management Console, navigate to the IAM service, and attach the policy AmazonManagedBlockchainPolygonAccess to the role assigned to your IAM user. Make Polygon remote procedure call (RPC) requests on the AMB Access RPC editor using the AWS Management Console You can edit, configure, and submit remote procedure calls (RPCs) on the AWS Management Console using AMB Access Polygon. With these RPCs, you can read data and write transactions on the Polygon network, including retrieving data and submitting transactions to the Polygon network. Example The following example shows how to get information about the latest block by using eth_getBlockByNumber RPC. Change the highlighted variables to your own inputs or choose one of the RPC methods listed and enter in the relevant inputs required. 1. Open the Managed Blockchain console at https://console.aws.amazon.com/ managedblockchain/. 2. Choose RPC editor. 3. In the Request section, choose POLYGON_MAINNET as the Blockchain Network. 4. Choose eth_getBlockByNumber as the RPC method. 5. 6. Enter latest as the Block number and choose False as the Full transaction flag. Then, choose Submit RPC. Console RPC example 8 AMB Access Polygon Developer Guide 7. You get the results of the latest block in the Response section. You can then copy the full raw transactions for further analysis or to use in business logic for your applications. For more information, see the RPCs supported by AMB Access Polygon Make AMB Access Polygon JSON-RPC requests in awscurl by using the AWS CLI Example Sign requests with your IAM user credentials by using Signature Version 4 (SigV4) in order to make Polygon JSON-RPC requests to the AMB Access Polygon endpoints. The awscurl command line tool can help you sign requests to AWS services using SigV4. For more information, see the awscurl README.md. Install awscurl by using the method appropriate to your operating system. On macOS, HomeBrew is the recommended application: brew install awscurl If you have already installed and configured the AWS CLI, your IAM user credentials and the default AWS Region are set in your environment and have access to awscurl. Using awscurl, submit a request to the Polygon Mainnet by invoking the eth_getBlockByNumber RPC. This call accepts a string parameter corresponding to the block number for which you want to retrieve information. The following command retrieves the block data from the Polygon Mainnet by using the block number in the params array to select the specific block for which to retrieve the headers. awscurl -X POST -d '{ "jsonrpc": "2.0", "id": "eth_getBlockByNumber-curltest", "method":"eth_getBlockByNumber", "params":["latest", false] }' --service managedblockchain https://mainnet.polygon.managedblockchain.us-east-1.amazonaws.com -k Tip You can also make this same request using curl and the AMB Access token based access feature using Accessor tokens. For more information, see Creating and managing Accessor tokens for token-based access to make AMB Access Polygon requests. awscurl RPC example 9 AMB Access Polygon Developer Guide curl -X POST -d '{"jsonrpc":"2.0", "id": "eth_getBlockByNumber-curltest", "method":"eth_getBlockByNumber", "params":["latest", false] }' 'https://mainnet.polygon.managedblockchain.us-east-1.amazonaws.com? billingtoken=your-billing-token' The response from either command returns information about the latest block. See the following example for illustrative purposes: {"error":null,"id":"eth_getBlockByNumber-curltest","jsonrpc":"1.0", "result":{"baseFeePerGas":"0x873bf591e","difficulty":"0x18", "extraData":"0xd78301000683626f7288676f312e32312e32856c696e757800000000000000009a \ 423a58511085d90eaf15201a612af21ccbf1e9f8350455adaba0d27eff0ecc4133e8cd255888304cc \ 67176a33b451277c2c3c1a6a6482d2ec25ee1573e8ba000", "gasLimit":"0x1c9c380","gasUsed":"0x14ca04d", "hash":"0x1ee390533a3abc3c8e1306cc1690a1d28d913d27b437c74c761e1a49********;", "nonce":"0x0000000000000000","number":"0x2f0ec4d", "parentHash":"0x27d47bc2c47a6d329eb8aa62c1353f60e138fb0c596e3e8e9425de163afd6dec", "receiptsRoot":"0x394da96025e51cc69bbe3644bc4e1302942c2a6ca6bf0cf241a5724c74c063fd", "sha3Uncles":"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size":"0xbd6b", "stateRoot":"0x7ca9363cfe9baf4d1c0dca3159461b2cca8604394e69b30af05d7d5c1beea6c3", "timestamp":"0x653ff542", "totalDifficulty":"0x33eb01dd","transactions":[...], "transactionsRoot":"0xda1602c66ffd746dd470e90a47488114a9d00f600ab598466ecc0f3340b24e0c", "uncles":[]}} Make Polygon JSON-RPC requests in Node.js You can invoke Polygon JSON-RPCs by submitting signed requests using HTTPS to access the Polygon Mainnet network using the native https module in Node.js, or you can use a third-party library such as AXIOS. The following Node.js examples show you how to make Polygon JSON-RPC Node.js RPC example 10 AMB Access Polygon Developer Guide requests to the AMB Access Polygon endpoint using both Signature Version 4 (SigV4) and token- based access. The first example sends a transaction from one address to another and the following example requests transaction details and balance information from the blockchain. Example To run this example Node.js script, apply the following prerequisites: 1. You must have node version manager (nvm) and Node.js installed on your machine. You can find installation instructions for your OS here. 2. Use the node --version command and confirm that you are using Node version 18 or higher. If required, you can use the nvm install v18.12.0 command, followed by the nvm use v18.12.0 command, to install version 18, the LTS version of Node. 3. The |
amb-polygon-dg-005 | amb-polygon-dg.pdf | 5 | sends a transaction from one address to another and the following example requests transaction details and balance information from the blockchain. Example To run this example Node.js script, apply the following prerequisites: 1. You must have node version manager (nvm) and Node.js installed on your machine. You can find installation instructions for your OS here. 2. Use the node --version command and confirm that you are using Node version 18 or higher. If required, you can use the nvm install v18.12.0 command, followed by the nvm use v18.12.0 command, to install version 18, the LTS version of Node. 3. The environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY must contain the credentials that are associated with your account. . Export these variables as strings on your client by using the following commands. Replace the values in red in the following strings with appropriate values from your IAM user account. export AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" export AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" After you complete all prerequisites, copy the following files into a directory in your local environment by using your preferred code editor: package.json { "name": "polygon-rpc", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "ethers": "^6.8.1", "@aws-crypto/sha256-js": "^5.2.0", Node.js RPC example 11 AMB Access Polygon Developer Guide "@aws-sdk/credential-provider-node": "^3.360.0", "@aws-sdk/protocol-http": "^3.357.0", "@aws-sdk/signature-v4": "^3.357.0", "axios": "^1.6.2" } } dispatch-evm-rpc.js const axios = require("axios"); const SHA256 = require("@aws-crypto/sha256-js").Sha256; const defaultProvider = require("@aws-sdk/credential-provider-node").defaultProvider; const HttpRequest = require("@aws-sdk/protocol-http").HttpRequest; const SignatureV4 = require("@aws-sdk/signature-v4").SignatureV4; // define a signer object with AWS service name, credentials, and region const signer = new SignatureV4({ credentials: defaultProvider(), service: "managedblockchain", region: "us-east-1", sha256: SHA256, }); const rpcRequest = async (rpcEndpoint, rpc) => { // parse the URL into its component parts (e.g. host, path) let url = new URL(rpcEndpoint); // create an HTTP Request object const req = new HttpRequest({ hostname: url.hostname.toString(), path: url.pathname.toString(), body: JSON.stringify(rpc), method: "POST", headers: { "Content-Type": "application/json", "Accept-Encoding": "gzip", host: url.hostname, }, }); // use AWS SignatureV4 utility to sign the request, extract headers and body const signedRequest = await signer.sign(req, { signingDate: new Date() }); Node.js RPC example 12 Developer Guide AMB Access Polygon try { //make the request using axios const response = await axios({ ...signedRequest, url: url, data: req.body, }); return response.data; } catch (error) { console.error("Something went wrong: ", error); } }; module.exports = { rpcRequest: rpcRequest }; sendTx.js Warning The following code uses a hardcoded private key to generate a wallet Signer using Ethers.js for the sake of demonstration only. Do not use this code in production environments, as it has real funds and poses a security risk. If needed, contact your account team to advise on wallet and Signer best practices. const ethers = require("ethers"); //set AMB Access Polygon endpoint using token based access (TBA) let token = "your-billing-token" let url = `https://mainnet.polygon.managedblockchain.us-east-1.amazonaws.com? billingtoken=${token}`; //prevent batch RPCs let options = { batchMaxCount: 1, }; //create JSON RPC provider with AMB Access endpoint and options let provider = new ethers.JsonRpcProvider(url, null, options); Node.js RPC example 13 AMB Access Polygon Developer Guide let sendTx = async (to) => { //create an instance of the Wallet class with a private key //DO NOT USE A WALLET YOU USE ON MAINNET, NEVER USE A RAW PRIVATE KEY IN PROD let pk = "wallet-private-key"; let signer = new ethers.Wallet(pk, provider); //use this wallet to send a transaction of POL from one address to another const tx = await signer.sendTransaction({ to: to, value: ethers.parseUnits("0.0001", "ether"), }); console.log(tx); }; sendTx("recipent-address"); readTx.js let rpcRequest = require("./dispatch-evm-rpc").rpcRequest; let ethers = require("ethers"); let getTxDetails = async (txHash) => { //set url to a Signature Version 4 endpoint for AMB Access let url = "https://mainnet.polygon.managedblockchain.us-east-1.amazonaws.com"; //set RPC request body to get transaction details let getTransactionByHash = { id: "1", jsonrpc: "2.0", method: "eth_getTransactionByHash", params: [txHash], }; //make RPC request for transaction details let txDetails = await rpcRequest(url, getTransactionByHash); //set RPC request body to get recipient user balance let getBalance = { id: "2", jsonrpc: "2.0", method: "eth_getBalance", params: [txDetails.result.to, "latest"], Node.js RPC example 14 AMB Access Polygon }; Developer Guide //make RPC request for recipient user balance let recipientBalance = await rpcRequest(url, getBalance); console.log("TX DETAILS: ", txDetails.result, "BALANCE: ", ethers.formatEther(recipientBalance.result)); }; getTxDetails("your-transaction-id"); Once these files are saved to your directory, install the dependencies that are required to run the code using the following command: npm install Send a transaction in Node.js The preceding example sends the native Polygon Mainnet token (POL) from one address to another by signing a transaction and broadcasting it to the Polygon Mainnet using AMB Access Polygon. To do this, use the sendTx.js script, which uses Ethers.js, a popular library for interacting with Ethereum and Ethereum-compatible blockchains like Polygon. You need to replace three variables in the code where highlighted in red, including the billingToken for your Accessor token for token |
amb-polygon-dg-006 | amb-polygon-dg.pdf | 6 | are saved to your directory, install the dependencies that are required to run the code using the following command: npm install Send a transaction in Node.js The preceding example sends the native Polygon Mainnet token (POL) from one address to another by signing a transaction and broadcasting it to the Polygon Mainnet using AMB Access Polygon. To do this, use the sendTx.js script, which uses Ethers.js, a popular library for interacting with Ethereum and Ethereum-compatible blockchains like Polygon. You need to replace three variables in the code where highlighted in red, including the billingToken for your Accessor token for token based access, the private key with which you sign the transaction, and the recipient's address that receives the POL. Tip We recommended that you create a fresh private key (wallet) for this purpose rather than reusing an existing wallet to eliminate the risk of losing funds. You can use the Ethers library’s Wallet class method createRandom() to generate a wallet to test with. Additionally, if you need to request POL from the Polygon Mainnet, you can use the public POL faucet to request a small amount to use for testing. Once you have your billingToken, a funded wallet’s private key, and the recipient's address added to the code, you run the following code to sign a transaction for .0001 POL Send transaction 15 AMB Access Polygon Developer Guide to be sent from your address to another and broadcast it to Polygon Mainnet invoking the eth_sendRawTransaction JSON-RPC using the AMB Access Polygon. node sendTx.js The response received back resembles the following: TransactionResponse { provider: JsonRpcProvider {}, blockNumber: null, blockHash: null, index: undefined, hash: '0x8d7538b4841261c5120c0a4dd66359e8ee189e7d1d34ac646a1d9923********', type: 2, to: '0xd2bb4f4f1BdC4CB54f715C249Fc5a991********', from: '0xcf2C679AC6cb7de09Bf6BB6042ecCF05********', nonce: 2, gasLimit: 21000n, gasPrice: undefined, maxPriorityFeePerGas: 16569518669n, maxFeePerGas: 16569518685n, data: '0x', value: 100000000000000n, chainId: 80001n, signature: Signature { r: "0x1b90ad9e9e4e005904562d50e904f9db10430a18b45931c059960ede337238ee", s: "0x7df3c930a964fd07fed4a59f60b4ee896ffc7df4ea41b0facfe82b470db448b7", yParity: 0, networkV: null }, accessList: [] } The response constitutes the transaction receipt. Save the value of the property hash. This is the identifier for the transaction you just submitted to the blockchain. You use this property in the read transaction example to get additional details about this transaction from the Polygon Mainnet. Note that the blockNumber and blockHash are null in the response. This is because the transaction has not yet been recorded in a block on the Polygon network. Note that these values are defined later and you might see them when you request the transaction details in the following section. Send transaction 16 AMB Access Polygon Developer Guide Read a transaction in Node.js In this section, you request the transaction details for the previously submitted transaction and retrieve the POL balance for the recipient address using read requests to the Polygon Mainnet using AMB Access Polygon. In the readTx.js file, replace the variable labeled your- transaction-id with the hash you saved from the response from running the code in the previous section. This code uses a utility, dispatch-evm-rpc.js, which signs HTTPS requests to AMB Access Polygon with the requisite Signature Version 4 (SigV4) modules from the AWS SDK and sends requests using the widely used HTTP client, AXIOS. The response received back resembles the following: TX DETAILS: { blockHash: '0x59433e0096c783acab0659175460bb3c919545ac14e737d7465b3ddc********', blockNumber: '0x28b4059', from: '0xcf2c679ac6cb7de09bf6bb6042eccf05b7fa1394', gas: '0x5208', gasPrice: '0x3db9eca5d', maxPriorityFeePerGas: '0x3db9eca4d', maxFeePerGas: '0x3db9eca5d', hash: '0x8d7538b4841261c5120c0a4dd66359e8ee189e7d1d34ac646a1d9923********', input: '0x', nonce: '0x2', to: '0xd2bb4f4f1bdc4cb54f715c249fc5a991********', transactionIndex: '0x0', value: '0x5af3107a4000', type: '0x2', accessList: [], chainId: '0x13881', v: '0x0', r: '0x1b90ad9e9e4e005904562d50e904f9db10430a18b45931c059960ede337238ee', s: '0x7df3c930a964fd07fed4a59f60b4ee896ffc7df4ea41b0facfe82b470db448b7' } BALANCE: 0.0003 The response represents the transaction details. Note that the blockHash and blockNumber are now likely defined. This indicates that the transaction has been recorded in a block. If these values are still null, wait a few minutes, then run the code again to check if your transaction has been included in a block. Lastly, the hexadecimal representation of the recipient address balance Read transaction 17 AMB Access Polygon Developer Guide (0x110d9316ec000) is converted to decimal using Ethers’ formatEther() method, which converts the hex to decimal and shifts decimal places by 18 (10^18) to give the true balance in POL. Tip While the preceding code examples illustrate how to use Node.js, Ethers, and Axios to utilize a few of the supported JSON-RPCs on AMB Access Polygon, you can modify the examples and write other code to build your applications on Polygon using this service. For a full list of supported JSON-RPCs on AMB Access Polygon, see Managed Blockchain API and the JSON-RPCs supported with AMB Access Polygon. Read transaction 18 AMB Access Polygon Developer Guide Creating and managing Accessor tokens for token-based access to make AMB Access Polygon requests You can also use Accessor tokens to make JSON-RPC calls to the Polygon network endpoints as a convenient alternative to the Signature Version 4 (SigV4) signing process. You must provide a BILLING_TOKEN from one of the Accessor tokens you create and add as a parameter with your |
amb-polygon-dg-007 | amb-polygon-dg.pdf | 7 | build your applications on Polygon using this service. For a full list of supported JSON-RPCs on AMB Access Polygon, see Managed Blockchain API and the JSON-RPCs supported with AMB Access Polygon. Read transaction 18 AMB Access Polygon Developer Guide Creating and managing Accessor tokens for token-based access to make AMB Access Polygon requests You can also use Accessor tokens to make JSON-RPC calls to the Polygon network endpoints as a convenient alternative to the Signature Version 4 (SigV4) signing process. You must provide a BILLING_TOKEN from one of the Accessor tokens you create and add as a parameter with your calls. Important • If you prioritize security and auditability over convenience, use the SigV4 signing process instead. • You can access the Polygon JSON-RPCs using Signature Version 4 (SigV4) and token- based access. However, if you choose to use both protocols, your request is rejected. • You must never embed Accessor tokens in user-facing applications. In the console, the Token Accessors page displays a list of all the Accessor tokens that you can use to make AMB Access Polygon JSON-RPC calls from your AWS account from code on a client. For more information about AMB Access Polygon JSON-RPC requests, see Managed Blockchain API and the JSON-RPCs supported with AMB Access Polygon. You can create and manage Accessor tokens using the AWS Management Console. You can also create and manage Accessor tokens using the following API operations: CreateAccessor, GetAccessor, ListAccessors, and DeleteAccessor. A BILLING_TOKEN is a property of the Accessor. This BILLING_TOKEN property is used to track your Accessor and for billing AMB Access Polygon JSON-RPC requests made from your AWS account. All API actions related to creating and managing Accessor tokens are also available through the AWS Management Console, AWS CLI, and SDKs. Creating an Accessor token for token-based access You can create an Accessor token and use it to make AMB Access Polygon API calls on any AMB Access Polygon node in your AWS account. Creating an Accessor token for token-based access 19 AMB Access Polygon Developer Guide Create an Accessor token to make AMB Access Polygon JSON-RPC requests using the AWS Management Console 1. Open the Managed Blockchain console at https://console.aws.amazon.com/ managedblockchain/. 2. Choose Token Accessors. 3. Choose Create Accessor. 4. Choose a valid Polygon blockchain Network. 5. Optional, add Tags for your Accessor. 6. Choose Create Accessor to create a new Accessor token. Create an Accessor token to make AMB Access Polygon JSON-RPC requests using the AWS CLI aws managedblockchain create-accessor --accessor-type BILLING_TOKEN --network-type POLYGON_MAINNET The previous command returns the AccessorId along with the BillingToken, as shown in the following example. { "AccessorId": "ac-NGQ6QNKXLNEBXD3UI6********", "NetworkType": "POLYGON_MAINNET", "BillingToken": "jZlP8OUI-PcQSKINyX9euJJDC5-IcW9e-n********" } The key element in your response is the BillingToken. You can use this property to make AMB Access Polygon JSON-RPC calls. Some values in the example have been obfuscated for security reasons but will appear fully in actual responses. Note After the operation is run, Managed Blockchain provisions and configures the token for you. The length of this process depends on many variables. Creating an Accessor token for token-based access 20 AMB Access Polygon Developer Guide Viewing an Accessor token details You can view the properties for each Accessor token that your AWS account owns. For example, you can view the Accessor ID or the Amazon Resource Name (ARN) of the Accessor. You can also view the status, the type, the creation date, and the BillingToken. To view an Accessor token's information using the AWS Management Console 1. Open the Managed Blockchain console at https://console.aws.amazon.com/ managedblockchain/. 2. In the navigation pane, choose Token Accessors. 3. Choose the Accessor ID of the token from the list. The token details page the pops up. From this page, you can view the properties of the token. To view an Accessor token's information using the AWS CLI Run the following command to view the details of an Accessor token. Replace values of -- accessor-id with your Accessor ID. aws managedblockchain get-accessor --accessor-id ac-NGQ6QNKXLNEBXD3UI6******** The BillingToken and other key properties are returned as shown in the following example. Some values in the example have been obfuscated for security reasons but appear fully in actual responses. { "Accessor": { "Id": "ac-NGQ6QNKXLNEBXD3UI6********", "Type": "BILLING_TOKEN", "BillingToken": "jZlP8OUI-PcQSKINyX9euJJDC5-IcW9e-n********", "Status": "AVAILABLE", "NetworkType": "POLYGON_MAINNET" "CreationDate": "2022-01-04T23:09:47.750Z", "Arn": "arn:aws:managedblockchain:us-east-1:666666666666:accessors/ac- NGQ6QNKXLNEBXD3UI6********" } } Viewing an Accessor token details 21 AMB Access Polygon Developer Guide Deleting an Accessor token When you delete an Accessor token, the token changes from the AVAILABLE to the PENDING_DELETION status. You can't use an Accessor token with the PENDING_DELETION status. To delete an Accessor token using the AWS Management Console 1. Open the Managed Blockchain console at https://console.aws.amazon.com/ managedblockchain/. 2. 3. In the navigation pane, choose Token Accessors. Select the Accessor token that you want from the list. 4. Choose Delete. 5. Confirm your choice. You're returned |
amb-polygon-dg-008 | amb-polygon-dg.pdf | 8 | "jZlP8OUI-PcQSKINyX9euJJDC5-IcW9e-n********", "Status": "AVAILABLE", "NetworkType": "POLYGON_MAINNET" "CreationDate": "2022-01-04T23:09:47.750Z", "Arn": "arn:aws:managedblockchain:us-east-1:666666666666:accessors/ac- NGQ6QNKXLNEBXD3UI6********" } } Viewing an Accessor token details 21 AMB Access Polygon Developer Guide Deleting an Accessor token When you delete an Accessor token, the token changes from the AVAILABLE to the PENDING_DELETION status. You can't use an Accessor token with the PENDING_DELETION status. To delete an Accessor token using the AWS Management Console 1. Open the Managed Blockchain console at https://console.aws.amazon.com/ managedblockchain/. 2. 3. In the navigation pane, choose Token Accessors. Select the Accessor token that you want from the list. 4. Choose Delete. 5. Confirm your choice. You're returned to the Tokens accessors page with your deleted Accessor token. The page displays the PENDING_DELETION status. To delete an Accessor token using the AWS CLI The following example shows how to delete a token. Use the delete-accessor command to delete a token. Set the value of --accessor-id with your Accessor ID. Deleting an Accessor token using the AWS CLI aws managedblockchain delete-accessor --accessor-id ac-NGQ6QNKXLNEBXD3UI6******** If this command runs successfully, no messages are returned. Deleting an Accessor token 22 AMB Access Polygon Developer Guide Managed Blockchain API and the JSON-RPCs supported with AMB Access Polygon Amazon Managed Blockchain provides API operations for creating and managing token accessors for AMB Access Polygon. For more information, see the Managed Blockchain API Reference Guide . The following topic provides a list and reference of the Polygon JSON-RPCs that AMB Access Polygon supports. Each supported JSON-RPC has a brief description of its use. You use the Polygon JSON-RPCs to query and get smart contract data, get transaction details, submit transactions, and other utilities such as running traces on transactions, and estimate fees. AMB Access Polygon supports the following JSON-RPC methods. Each supported JSON-RPC has a category and a brief description of its utility and its default request quotas. Unique considerations for using the JSON-RPC method with Amazon Managed Blockchain are indicated where applicable. Note • Any methods that aren't listed are not supported. • When making calls to the Polygon JSON-RPCs on Amazon Managed Blockchain, you can do so over an HTTPS connection authenticated using the Signature Version 4 signing process. This means that only authorized IAM principals in the AWS account can make Polygon JSON-RPC calls. To do this, AWS credentials (an access key ID and a secret access key) must be provided with the call. • You can also use token-based access as a convenient alternative to the Signature Version 4 (SigV4) signing process. If you prioritize security and auditability over convenience, use the SigV4 signing process instead. However, if you use both SigV4 and token-based access, your requests will not work. • JSON-RPC batch requests aren't supported on Amazon Managed Blockchain (AMB) Access Polygon for this preview. • The Quotas column in the following table lists the quota for each JSON-RPC. Quotas are set in requests per second (RPS) per Region per Polygon network (Mainnet) for each JSON-RPC. For increasing your quota, you must contact Support. To contact Support, sign into the AWS Support Center Console. Choose Create case. Choose Technical. Choose Managed 23 AMB Access Polygon Developer Guide Blockchain as your service. Choose Access:Polygon as your Category and General guidance as your Severity. Enter RPC Quota as the Subject and in the Description text box list the JSON-RPC and the quota limits applicable to your needs in RPS per Polygon network per Region. Submit your case. Category JSON-RPC Description Considerations Quota Ethereum eth_blockNumber eth_call eth_chainId eth_estimateGas Returns the number of the most recent block. 150 Immediately runs a new message call 100eth_call consumes 0 gas, without creating a but has a gas transaction on the parameter for blockchain. messages that require it. 300 10 Returns an integer value for the currently configure d Chain Id value that's introduced in EIP-155. Returns None if no Chain Id is available. Estimates and returns the gas that's required for a transaction without adding the transaction to the blockchain. 24 AMB Access Polygon Developer Guide Category JSON-RPC Description Considerations Quota eth_feeHistory eth_gasPrice eth_getBalance eth_getBlockByHash eth_getBlockByNumber eth_getBlockReceipts eth_getBlockTransactionCountByHash Returns a collectio n of historical gas 10 information. 100 100 100 150 10 100 Returns the current price per gas in Wei. Returns the balance of an account for the specified account address and block identifier. Returns informati on about the block specified using the block hash. Returns informati on about the block specified using the block number. Returns receipts about the block specified using the block number. Returns the number of transactions in the block specified using the block hash. 25 AMB Access Polygon Developer Guide Category JSON-RPC Description Considerations Quota eth_getBlockTransactionCoun tByNumber eth_getCode eth_getLogs Returns the number of transactions in the block specified using the block number. Returns the code at the specified account address and block identifie r. Returns an array of all logs |
amb-polygon-dg-009 | amb-polygon-dg.pdf | 9 | account for the specified account address and block identifier. Returns informati on about the block specified using the block hash. Returns informati on about the block specified using the block number. Returns receipts about the block specified using the block number. Returns the number of transactions in the block specified using the block hash. 25 AMB Access Polygon Developer Guide Category JSON-RPC Description Considerations Quota eth_getBlockTransactionCoun tByNumber eth_getCode eth_getLogs Returns the number of transactions in the block specified using the block number. Returns the code at the specified account address and block identifie r. Returns an array of all logs for a specified filter object. 100 100 10You can make eth_getloqs requests on any block range with a 1K block range by default when a contract address is provided. Contracts with high activity may be limited to smaller block ranges. If no contract address is provided, the block range will be 8. 26 AMB Access Polygon Developer Guide Category JSON-RPC Description Considerations Quota eth_getRawTransactionByHash eth_getStorageAt 150 150 Returns the raw form of the transacti on specified by the transacti on_hash . Returns the value of the specified storage position for the specified account address and block identifie r. eth_getTransactionByBlockHashAndInde x Returns informati on about a 150 eth_getTransactionByBlockNu mberAndIndex eth_getTransactionByHash transaction using the specified block hash and transacti on index position. Returns informati on about a transaction using the specified block number and transaction index position. Returns informati on about the transaction with the specified transaction hash. 150 150 27 AMB Access Polygon Developer Guide Category JSON-RPC Description Considerations Quota eth_getTransactionCount eth_getTransactionReceipt eth_getUncleByBlockHashAndIndex eth_getUncleByBlockNumberAndIndex eth_getUncleCountByBlockHash 100 Returns the number of transactions sent from the specified address and block identifier. 150 Returns the receipt of the transaction using the specified transaction hash. Returns informati on about the uncle 150 block specified using the block hash and uncle index position. Returns informati on about the uncle 150 block specified using the block number and uncle index position. Returns the number of counts in the uncle specified using the uncle hash. 150 28 AMB Access Polygon Developer Guide Category JSON-RPC Description Considerations Quota eth_getUncleCountByBlockNumber eth_maxPriorityFeePerGas eth_protocolVersion eth_sendRawTransaction Returns the number of counts 150 in the uncle specified using the uncle number. Returns the fee per gas that's an 300Generally you use the value that's estimate of how returned from this much you can method to set the pay as a priority fee, or "tip," to get a transaction included in the current block. maxFeePerGas in the subsequen t transaction that you're submitting. Returns the current Ethereum protocol version. 300 Creates a new message call transaction or a contract 10Managed Blockchain supports raw transactions only. creation for signed You must create transactions. and sign transacti ons before sending them. 29 AMB Access Polygon Developer Guide Category JSON-RPC Description Considerations Quota Debug debug_traceBlockByHash debug_traceBlockByNumber debug_traceCall debug_traceTransaction 10 10 10 Returns the possible tracing result number by executing all transactions in the block specified by the block hash with a tracer (Trace Mode required). Returns the tracing result by executing all transactions in the block specified by number with a tracer (Trace Mode required). Returns the number of possible tracing results by executing an eth call within the context of the given block execution (Trace Mode required). 10 Returns all traces of a given transacti on (Trace Mode required). 30 AMB Access Polygon Developer Guide Category JSON-RPC Description Considerations Quota Net net_version Trace trace_block trace_call trace_transaction Tx Pool txpool_content Returns the current network id. 300 Returns a full stack trace of all invoked 10 opcodes of all transactions that were included in a block. 10 Returns the number of possible tracing results by executing an eth call within the context of the given block execution (Trace Mode required). Returns all traces of a given transacti 100 on (Trace Mode required). Returns all pending and queued transacti ons. 2 31 AMB Access Polygon Developer Guide Category JSON-RPC Description Considerations Quota txpool_status Web web3_clientVersion 10 Provides a count of all transactions currently pending inclusion in the next blocks, and those that are queued (being scheduled for future execution only). Returns the current client version. 150 32 AMB Access Polygon Developer Guide Polygon use cases with Amazon Managed Blockchain (AMB) Access Polygon The Polygon blockchain is commonly used in building decentralized applications (dApps) related to NFTs, Web3 games, and tokenization use cases, among others. This topic provides a list of some of the use cases that you can implement using Amazon Managed Blockchain (AMB) Access Polygon. Topics • Analyze Polygon NFT data • Support NFT purchases • Create a Polygon wallet • Wallet as a service • Token-gated experiences Analyze Polygon NFT data You can collect data about Polygon NFTs, including information like transfer events and NFT metadata for a specified period. You can then analyze this data to draw |
amb-polygon-dg-010 | amb-polygon-dg.pdf | 10 | Access Polygon The Polygon blockchain is commonly used in building decentralized applications (dApps) related to NFTs, Web3 games, and tokenization use cases, among others. This topic provides a list of some of the use cases that you can implement using Amazon Managed Blockchain (AMB) Access Polygon. Topics • Analyze Polygon NFT data • Support NFT purchases • Create a Polygon wallet • Wallet as a service • Token-gated experiences Analyze Polygon NFT data You can collect data about Polygon NFTs, including information like transfer events and NFT metadata for a specified period. You can then analyze this data to draw insights like which NFTs are trending or which users are most frequently interacting with a given collection. For more information, see Managed Blockchain API and the JSON-RPCs supported with AMB Access Polygon. Support NFT purchases You can use AMB Access Polygon to submit transactions for NFT purchases using initial mint, allowlists, or on the secondary market. Using a combination of other AWS services, you can then permit purchases using credit cards, accepting Fiat or cryptocurrencies, with a quick settlement for all stakeholders involved. For more information, see Managed Blockchain API and the JSON-RPCs supported with AMB Access Polygon. Analyze Polygon NFT data 33 AMB Access Polygon Developer Guide Create a Polygon wallet You can use AMB Access Polygon to serve critical functions of digital asset wallets, such as reading user token balances from smart contracts on the blockchain or broadcasting signed transactions to the blockchain. For more information, see Managed Blockchain API and the JSON-RPCs supported with AMB Access Polygon. Wallet as a service You can use AMB Access Polygon to develop an operating wallet-as-a-service needed to support common wallet transactions such as checking a balance, asset transfer, asset send, and fee estimations, using the supported Polygon JSON-RPCs. For more information, see Managed Blockchain API and the JSON-RPCs supported with AMB Access Polygon. Token-gated experiences You can use AMB Access Polygon to build token-gated experiences for your users. For example, you can conditionally provide access to a piece of content only to the owners of a specific NFT. To achieve this, you must read the blockchain to determine the NFT ownership of a user's address. For more information, see Managed Blockchain API and the JSON-RPCs supported with AMB Access Polygon. Create a Polygon wallet 34 AMB Access Polygon Developer Guide Tutorials for Amazon Managed Blockchain (AMB) Access Polygon The following tutorials highlighted in this section are Community Articles from AWS re:Post that provide walkthroughs to help you learn how to perform some common tasks on the Polygon blockchain using AMB Access Polygon. • Sending transactions using AMB Access Polygon and web3.js • Deploy a smart contract using AMB Access Polygon and Hardhat Ignition • Interacting with a smart contract • Retrieve current price data off-chain using AMB Access Polygon and Chainlink data feeds • Analyze ERC-20 token data on Polygon Mainnet with AMB Access 35 AMB Access Polygon Developer Guide Security in Amazon Managed Blockchain (AMB) Access Polygon Cloud security at AWS is of the highest priority. As an AWS customer, you benefit from data centers and network architectures that are built to meet the requirements of the most security-sensitive organizations. Security is a shared responsibility between AWS and you. The shared responsibility model describes this as both security of the cloud and security in the cloud: • Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. Third- party auditors regularly test and verify the effectiveness of our security as part of the AWS Compliance Programs. To learn about the compliance programs that apply to Amazon Managed Blockchain (AMB) Access Polygon, see AWS Services in Scope by Compliance Program. • Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors, including the sensitivity of your data, your company’s requirements, and applicable laws and regulations. To provide data protection, authentication, and access control, Amazon Managed Blockchain uses AWS features and the features of the open-source framework running in Managed Blockchain. This documentation helps you understand how to apply the shared responsibility model when using AMB Access Polygon. The following topics show you how to configure AMB Access Polygon to meet your security and compliance objectives. You also learn how to use other AWS services that help you to monitor and secure your AMB Access Polygon resources. Topics • Data protection in Amazon Managed Blockchain (AMB) Access Polygon • Identity and access management for Amazon Managed Blockchain (AMB) Access Polygon 36 AMB Access Polygon Developer Guide Data protection in Amazon Managed Blockchain (AMB) Access Polygon The AWS shared responsibility model applies to data protection in Amazon Managed |
amb-polygon-dg-011 | amb-polygon-dg.pdf | 11 | to apply the shared responsibility model when using AMB Access Polygon. The following topics show you how to configure AMB Access Polygon to meet your security and compliance objectives. You also learn how to use other AWS services that help you to monitor and secure your AMB Access Polygon resources. Topics • Data protection in Amazon Managed Blockchain (AMB) Access Polygon • Identity and access management for Amazon Managed Blockchain (AMB) Access Polygon 36 AMB Access Polygon Developer Guide Data protection in Amazon Managed Blockchain (AMB) Access Polygon The AWS shared responsibility model applies to data protection in Amazon Managed Blockchain (AMB) Access Polygon. As described in this model, AWS is responsible for protecting the global infrastructure that runs all of the AWS Cloud. You are responsible for maintaining control over your content that is hosted on this infrastructure. You are also responsible for the security configuration and management tasks for the AWS services that you use. For more information about data privacy, see the Data Privacy FAQ. For information about data protection in Europe, see the AWS Shared Responsibility Model and GDPR blog post on the AWS Security Blog. For data protection purposes, we recommend that you protect AWS account credentials and set up individual users with AWS IAM Identity Center or AWS Identity and Access Management (IAM). That way, each user is given only the permissions necessary to fulfill their job duties. We also recommend that you secure your data in the following ways: • Use multi-factor authentication (MFA) with each account. • Use SSL/TLS to communicate with AWS resources. We require TLS 1.2 and recommend TLS 1.3. • Set up API and user activity logging with AWS CloudTrail. For information about using CloudTrail trails to capture AWS activities, see Working with CloudTrail trails in the AWS CloudTrail User Guide. • Use AWS encryption solutions, along with all default security controls within AWS services. • Use advanced managed security services such as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3. • If you require FIPS 140-3 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see Federal Information Processing Standard (FIPS) 140-3. We strongly recommend that you never put confidential or sensitive information, such as your customers' email addresses, into tags or free-form text fields such as a Name field. This includes when you work with AMB Access Polygon or other AWS services using the console, API, AWS CLI, or AWS SDKs. Any data that you enter into tags or free-form text fields used for names may be used for billing or diagnostic logs. If you provide a URL to an external server, we strongly recommend that you do not include credentials information in the URL to validate your request to that server. Data protection 37 AMB Access Polygon Data encryption Developer Guide Data encryption helps prevent unauthorized users from reading data from a blockchain network and the associated data storage systems. This includes data that might be intercepted as it travels the network, known as data in transit. Encryption in transit By default, Managed Blockchain uses an HTTPS/TLS connection to encrypt all the data that's transmitted from a client computer that runs the AWS CLI to AWS service endpoints. You don't need to do anything to enable the use of HTTPS/TLS. It's always enabled unless you explicitly disable it for an individual AWS CLI command by using the --no-verify-ssl command. Identity and access management for Amazon Managed Blockchain (AMB) Access Polygon AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. IAM administrators control who can be authenticated (signed in) and authorized (have permissions) to use AMB Access Polygon resources. IAM is an AWS service that you can use with no additional charge. Topics • Audience • Authenticating with identities • Managing access using policies • How Amazon Managed Blockchain (AMB) Access Polygon works with IAM • Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Polygon • Troubleshooting Amazon Managed Blockchain (AMB) Access Polygon identity and access Audience How you use AWS Identity and Access Management (IAM) differs, depending on the work that you do in AMB Access Polygon. Service user – If you use the AMB Access Polygon service to do your job, then your administrator provides you with the credentials and permissions that you need. As you use more AMB Access Data encryption 38 AMB Access Polygon Developer Guide Polygon features to do your work, you might need additional permissions. Understanding how access is managed can help you request the right permissions from your administrator. If you cannot access a feature in AMB Access Polygon, see Troubleshooting Amazon Managed |
amb-polygon-dg-012 | amb-polygon-dg.pdf | 12 | AWS Identity and Access Management (IAM) differs, depending on the work that you do in AMB Access Polygon. Service user – If you use the AMB Access Polygon service to do your job, then your administrator provides you with the credentials and permissions that you need. As you use more AMB Access Data encryption 38 AMB Access Polygon Developer Guide Polygon features to do your work, you might need additional permissions. Understanding how access is managed can help you request the right permissions from your administrator. If you cannot access a feature in AMB Access Polygon, see Troubleshooting Amazon Managed Blockchain (AMB) Access Polygon identity and access. Service administrator – If you're in charge of AMB Access Polygon resources at your company, you probably have full access to AMB Access Polygon. It's your job to determine which AMB Access Polygon features and resources your service users should access. You must then submit requests to your IAM administrator to change the permissions of your service users. Review the information on this page to understand the basic concepts of IAM. To learn more about how your company can use IAM with AMB Access Polygon, see How Amazon Managed Blockchain (AMB) Access Polygon works with IAM. IAM administrator – If you're an IAM administrator, you might want to learn details about how you can write policies to manage access to AMB Access Polygon. To view example AMB Access Polygon identity-based policies that you can use in IAM, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Polygon. Authenticating with identities Authentication is how you sign in to AWS using your identity credentials. You must be authenticated (signed in to AWS) as the AWS account root user, as an IAM user, or by assuming an IAM role. You can sign in to AWS as a federated identity by using credentials provided through an identity source. AWS IAM Identity Center (IAM Identity Center) users, your company's single sign-on authentication, and your Google or Facebook credentials are examples of federated identities. When you sign in as a federated identity, your administrator previously set up identity federation using IAM roles. When you access AWS by using federation, you are indirectly assuming a role. Depending on the type of user you are, you can sign in to the AWS Management Console or the AWS access portal. For more information about signing in to AWS, see How to sign in to your AWS account in the AWS Sign-In User Guide. If you access AWS programmatically, AWS provides a software development kit (SDK) and a command line interface (CLI) to cryptographically sign your requests by using your credentials. If you don't use AWS tools, you must sign requests yourself. For more information about using the recommended method to sign requests yourself, see AWS Signature Version 4 for API requests in the IAM User Guide. Authenticating with identities 39 AMB Access Polygon Developer Guide Regardless of the authentication method that you use, you might be required to provide additional security information. For example, AWS recommends that you use multi-factor authentication (MFA) to increase the security of your account. To learn more, see Multi-factor authentication in the AWS IAM Identity Center User Guide and AWS Multi-factor authentication in IAM in the IAM User Guide. AWS account root user When you create an AWS account, you begin with one sign-in identity that has complete access to all AWS services and resources in the account. This identity is called the AWS account root user and is accessed by signing in with the email address and password that you used to create the account. We strongly recommend that you don't use the root user for your everyday tasks. Safeguard your root user credentials and use them to perform the tasks that only the root user can perform. For the complete list of tasks that require you to sign in as the root user, see Tasks that require root user credentials in the IAM User Guide. Federated identity As a best practice, require human users, including users that require administrator access, to use federation with an identity provider to access AWS services by using temporary credentials. A federated identity is a user from your enterprise user directory, a web identity provider, the AWS Directory Service, the Identity Center directory, or any user that accesses AWS services by using credentials provided through an identity source. When federated identities access AWS accounts, they assume roles, and the roles provide temporary credentials. For centralized access management, we recommend that you use AWS IAM Identity Center. You can create users and groups in IAM Identity Center, or you can connect and synchronize to a set of users and groups in your own identity source for use across all your AWS accounts and applications. For information about IAM Identity Center, |
amb-polygon-dg-013 | amb-polygon-dg.pdf | 13 | user directory, a web identity provider, the AWS Directory Service, the Identity Center directory, or any user that accesses AWS services by using credentials provided through an identity source. When federated identities access AWS accounts, they assume roles, and the roles provide temporary credentials. For centralized access management, we recommend that you use AWS IAM Identity Center. You can create users and groups in IAM Identity Center, or you can connect and synchronize to a set of users and groups in your own identity source for use across all your AWS accounts and applications. For information about IAM Identity Center, see What is IAM Identity Center? in the AWS IAM Identity Center User Guide. IAM users and groups An IAM user is an identity within your AWS account that has specific permissions for a single person or application. Where possible, we recommend relying on temporary credentials instead of creating IAM users who have long-term credentials such as passwords and access keys. However, if you have specific use cases that require long-term credentials with IAM users, we recommend that you rotate access keys. For more information, see Rotate access keys regularly for use cases that require long- term credentials in the IAM User Guide. Authenticating with identities 40 AMB Access Polygon Developer Guide An IAM group is an identity that specifies a collection of IAM users. You can't sign in as a group. You can use groups to specify permissions for multiple users at a time. Groups make permissions easier to manage for large sets of users. For example, you could have a group named IAMAdmins and give that group permissions to administer IAM resources. Users are different from roles. A user is uniquely associated with one person or application, but a role is intended to be assumable by anyone who needs it. Users have permanent long-term credentials, but roles provide temporary credentials. To learn more, see Use cases for IAM users in the IAM User Guide. IAM roles An IAM role is an identity within your AWS account that has specific permissions. It is similar to an IAM user, but is not associated with a specific person. To temporarily assume an IAM role in the AWS Management Console, you can switch from a user to an IAM role (console). You can assume a role by calling an AWS CLI or AWS API operation or by using a custom URL. For more information about methods for using roles, see Methods to assume a role in the IAM User Guide. IAM roles with temporary credentials are useful in the following situations: • Federated user access – To assign permissions to a federated identity, you create a role and define permissions for the role. When a federated identity authenticates, the identity is associated with the role and is granted the permissions that are defined by the role. For information about roles for federation, see Create a role for a third-party identity provider (federation) in the IAM User Guide. If you use IAM Identity Center, you configure a permission set. To control what your identities can access after they authenticate, IAM Identity Center correlates the permission set to a role in IAM. For information about permissions sets, see Permission sets in the AWS IAM Identity Center User Guide. • Temporary IAM user permissions – An IAM user or role can assume an IAM role to temporarily take on different permissions for a specific task. • Cross-account access – You can use an IAM role to allow someone (a trusted principal) in a different account to access resources in your account. Roles are the primary way to grant cross- account access. However, with some AWS services, you can attach a policy directly to a resource (instead of using a role as a proxy). To learn the difference between roles and resource-based policies for cross-account access, see Cross account resource access in IAM in the IAM User Guide. • Cross-service access – Some AWS services use features in other AWS services. For example, when you make a call in a service, it's common for that service to run applications in Amazon EC2 or Authenticating with identities 41 AMB Access Polygon Developer Guide store objects in Amazon S3. A service might do this using the calling principal's permissions, using a service role, or using a service-linked role. • Forward access sessions (FAS) – When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions |
amb-polygon-dg-014 | amb-polygon-dg.pdf | 14 | S3. A service might do this using the calling principal's permissions, using a service role, or using a service-linked role. • Forward access sessions (FAS) – When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. • Service role – A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. • Service-linked role – A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. • Applications running on Amazon EC2 – You can use an IAM role to manage temporary credentials for applications that are running on an EC2 instance and making AWS CLI or AWS API requests. This is preferable to storing access keys within the EC2 instance. To assign an AWS role to an EC2 instance and make it available to all of its applications, you create an instance profile that is attached to the instance. An instance profile contains the role and enables programs that are running on the EC2 instance to get temporary credentials. For more information, see Use an IAM role to grant permissions to applications running on Amazon EC2 instances in the IAM User Guide. Managing access using policies You control access in AWS by creating policies and attaching them to AWS identities or resources. A policy is an object in AWS that, when associated with an identity or resource, defines their permissions. AWS evaluates these policies when a principal (user, root user, or role session) makes a request. Permissions in the policies determine whether the request is allowed or denied. Most policies are stored in AWS as JSON documents. For more information about the structure and contents of JSON policy documents, see Overview of JSON policies in the IAM User Guide. Managing access using policies 42 AMB Access Polygon Developer Guide Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. By default, users and roles have no permissions. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. IAM policies define permissions for an action regardless of the method that you use to perform the operation. For example, suppose that you have a policy that allows the iam:GetRole action. A user with that policy can get role information from the AWS Management Console, the AWS CLI, or the AWS API. Identity-based policies Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. Identity-based policies can be further categorized as inline policies or managed policies. Inline policies are embedded directly into a single user, group, or role. Managed policies are standalone policies that you can attach to multiple users, groups, and roles in your AWS account. Managed policies include AWS managed policies and customer managed policies. To learn how to choose between a managed policy or an inline policy, see Choose between managed policies and inline policies in the IAM User Guide. Resource-based policies Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that |
amb-polygon-dg-015 | amb-polygon-dg.pdf | 15 | include AWS managed policies and customer managed policies. To learn how to choose between a managed policy or an inline policy, see Choose between managed policies and inline policies in the IAM User Guide. Resource-based policies Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must specify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. Resource-based policies are inline policies that are located in that service. You can't use AWS managed policies from IAM in a resource-based policy. Managing access using policies 43 AMB Access Polygon Access control lists (ACLs) Developer Guide Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. Amazon S3, AWS WAF, and Amazon VPC are examples of services that support ACLs. To learn more about ACLs, see Access control list (ACL) overview in the Amazon Simple Storage Service Developer Guide. Other policy types AWS supports additional, less-common policy types. These policy types can set the maximum permissions granted to you by the more common policy types. • Permissions boundaries – A permissions boundary is an advanced feature in which you set the maximum permissions that an identity-based policy can grant to an IAM entity (IAM user or role). You can set a permissions boundary for an entity. The resulting permissions are the intersection of an entity's identity-based policies and its permissions boundaries. Resource-based policies that specify the user or role in the Principal field are not limited by the permissions boundary. An explicit deny in any of these policies overrides the allow. For more information about permissions boundaries, see Permissions boundaries for IAM entities in the IAM User Guide. • Service control policies (SCPs) – SCPs are JSON policies that specify the maximum permissions for an organization or organizational unit (OU) in AWS Organizations. AWS Organizations is a service for grouping and centrally managing multiple AWS accounts that your business owns. If you enable all features in an organization, then you can apply service control policies (SCPs) to any or all of your accounts. The SCP limits permissions for entities in member accounts, including each AWS account root user. For more information about Organizations and SCPs, see Service control policies in the AWS Organizations User Guide. • Resource control policies (RCPs) – RCPs are JSON policies that you can use to set the maximum available permissions for resources in your accounts without updating the IAM policies attached to each resource that you own. The RCP limits permissions for resources in member accounts and can impact the effective permissions for identities, including the AWS account root user, regardless of whether they belong to your organization. For more information about Organizations and RCPs, including a list of AWS services that support RCPs, see Resource control policies (RCPs) in the AWS Organizations User Guide. • Session policies – Session policies are advanced policies that you pass as a parameter when you programmatically create a temporary session for a role or federated user. The resulting session's Managing access using policies 44 AMB Access Polygon Developer Guide permissions are the intersection of the user or role's identity-based policies and the session policies. Permissions can also come from a resource-based policy. An explicit deny in any of these policies overrides the allow. For more information, see Session policies in the IAM User Guide. Multiple policy types When multiple types of policies apply to a request, the resulting permissions are more complicated to understand. To learn how AWS determines whether to allow a request when multiple policy types are involved, see Policy evaluation logic in the IAM User Guide. How Amazon Managed Blockchain (AMB) Access Polygon works with IAM Before you use IAM to manage access to AMB Access Polygon, learn what IAM features are available to use with AMB Access Polygon. IAM features you can use with Amazon Managed Blockchain (AMB) Access Polygon IAM feature AMB Access Polygon support Identity-based policies Resource-based policies Policy actions Policy resources Policy condition keys ACLs ABAC (tags in policies) Temporary credentials Principal permissions Service roles Yes No Yes No No No No No No No How Amazon Managed Blockchain (AMB) Access Polygon works with IAM 45 AMB Access Polygon IAM feature AMB Access Polygon support Developer Guide Service-linked roles No To get a high-level view of how AMB Access Polygon and |
amb-polygon-dg-016 | amb-polygon-dg.pdf | 16 | Access Polygon, learn what IAM features are available to use with AMB Access Polygon. IAM features you can use with Amazon Managed Blockchain (AMB) Access Polygon IAM feature AMB Access Polygon support Identity-based policies Resource-based policies Policy actions Policy resources Policy condition keys ACLs ABAC (tags in policies) Temporary credentials Principal permissions Service roles Yes No Yes No No No No No No No How Amazon Managed Blockchain (AMB) Access Polygon works with IAM 45 AMB Access Polygon IAM feature AMB Access Polygon support Developer Guide Service-linked roles No To get a high-level view of how AMB Access Polygon and other AWS services work with most IAM features, see AWS services that work with IAM in the IAM User Guide. Identity-based policies for AMB Access Polygon Supports identity-based policies: Yes Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. You can't specify the principal in an identity-based policy because it applies to the user or role to which it is attached. To learn about all of the elements that you can use in a JSON policy, see IAM JSON policy elements reference in the IAM User Guide. Identity-based policy examples for AMB Access Polygon To view examples of AMB Access Polygon identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Polygon. Resource-based policies within AMB Access Polygon Supports resource-based policies: No Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must specify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. How Amazon Managed Blockchain (AMB) Access Polygon works with IAM 46 AMB Access Polygon Developer Guide To enable cross-account access, you can specify an entire account or IAM entities in another account as the principal in a resource-based policy. Adding a cross-account principal to a resource- based policy is only half of establishing the trust relationship. When the principal and the resource are in different AWS accounts, an IAM administrator in the trusted account must also grant the principal entity (user or role) permission to access the resource. They grant permission by attaching an identity-based policy to the entity. However, if a resource-based policy grants access to a principal in the same account, no additional identity-based policy is required. For more information, see Cross account resource access in IAM in the IAM User Guide. Policy actions for AMB Access Polygon Supports policy actions: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Action element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated AWS API operation. There are some exceptions, such as permission-only actions that don't have a matching API operation. There are also some operations that require multiple actions in a policy. These additional actions are called dependent actions. Include actions in a policy to grant permissions to perform the associated operation. To see a list of AMB Access Polygon actions, see Actions Defined by Amazon Managed Blockchain (AMB) Access Polygon in the Service Authorization Reference. Policy actions in AMB Access Polygon use the following prefix before the action: managedblockchain: To specify multiple actions in a single statement, separate them with commas. "Action": [ "managedblockchain::action1", "managedblockchain::action2" ] How Amazon Managed Blockchain (AMB) Access Polygon works with IAM 47 AMB Access Polygon Developer Guide You can specify multiple actions using wildcards (*). For example, to specify all actions that begin with the word InvokeRpcPolygon, include the following action: "Action": "managedblockchain::InvokeRpcPolygon*" To view examples of AMB Access Polygon identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Polygon. Policy resources for AMB Access Polygon Supports policy resources: No Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The |
amb-polygon-dg-017 | amb-polygon-dg.pdf | 17 | How Amazon Managed Blockchain (AMB) Access Polygon works with IAM 47 AMB Access Polygon Developer Guide You can specify multiple actions using wildcards (*). For example, to specify all actions that begin with the word InvokeRpcPolygon, include the following action: "Action": "managedblockchain::InvokeRpcPolygon*" To view examples of AMB Access Polygon identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Polygon. Policy resources for AMB Access Polygon Supports policy resources: No Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Resource JSON policy element specifies the object or objects to which the action applies. Statements must include either a Resource or a NotResource element. As a best practice, specify a resource using its Amazon Resource Name (ARN). You can do this for actions that support a specific resource type, known as resource-level permissions. For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to indicate that the statement applies to all resources. "Resource": "*" To see a list of AMB Access Polygon resource types and their ARNs, see Resources Defined by Amazon Managed Blockchain (AMB) Access Polygon in the Service Authorization Reference. To learn with which actions you can specify the ARN of each resource, see Actions Defined by Amazon Managed Blockchain (AMB) Access Polygon . To view examples of AMB Access Polygon identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Polygon. Policy condition keys for AMB Access Polygon Supports service-specific policy condition keys: No Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. How Amazon Managed Blockchain (AMB) Access Polygon works with IAM 48 AMB Access Polygon Developer Guide The Condition element (or Condition block) lets you specify conditions in which a statement is in effect. The Condition element is optional. You can create conditional expressions that use condition operators, such as equals or less than, to match the condition in the policy with values in the request. If you specify multiple Condition elements in a statement, or multiple keys in a single Condition element, AWS evaluates them using a logical AND operation. If you specify multiple values for a single condition key, AWS evaluates the condition using a logical OR operation. All of the conditions must be met before the statement's permissions are granted. You can also use placeholder variables when you specify conditions. For example, you can grant an IAM user permission to access a resource only if it is tagged with their IAM user name. For more information, see IAM policy elements: variables and tags in the IAM User Guide. AWS supports global condition keys and service-specific condition keys. To see all AWS global condition keys, see AWS global condition context keys in the IAM User Guide. To see a list of AMB Access Polygon condition keys, see Condition Keys for Amazon Managed Blockchain (AMB) Access Polygon in the Service Authorization Reference. To learn with which actions and resources you can use a condition key, see Actions Defined by Amazon Managed Blockchain (AMB) Access Polygon . To view examples of AMB Access Polygon identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Polygon. ACLs in AMB Access Polygon Supports ACLs: No Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. ABAC with AMB Access Polygon Supports ABAC (tags in policies): No Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes. In AWS, these attributes are called tags. You can attach tags to IAM entities (users or roles) and to many AWS resources. Tagging entities and resources is the first step of ABAC. Then How Amazon Managed Blockchain (AMB) Access Polygon works with IAM 49 AMB Access Polygon Developer Guide you design ABAC policies to allow operations when the principal's tag matches the tag on the resource that they are trying to access. ABAC is helpful in environments that are growing rapidly and helps with situations where policy management becomes cumbersome. To control access based on tags, you provide tag information in the condition element of a policy using the aws:ResourceTag/key-name, aws:RequestTag/key-name, or aws:TagKeys condition keys. If a service supports all three condition keys for every resource type, then the value is Yes for the service. If a service supports all three condition keys for only some resource types, then the value is Partial. For more information about ABAC, see Define permissions with ABAC authorization in the IAM User Guide. To view a tutorial with steps for |
amb-polygon-dg-018 | amb-polygon-dg.pdf | 18 | environments that are growing rapidly and helps with situations where policy management becomes cumbersome. To control access based on tags, you provide tag information in the condition element of a policy using the aws:ResourceTag/key-name, aws:RequestTag/key-name, or aws:TagKeys condition keys. If a service supports all three condition keys for every resource type, then the value is Yes for the service. If a service supports all three condition keys for only some resource types, then the value is Partial. For more information about ABAC, see Define permissions with ABAC authorization in the IAM User Guide. To view a tutorial with steps for setting up ABAC, see Use attribute-based access control (ABAC) in the IAM User Guide. Using temporary credentials with AMB Access Polygon Supports temporary credentials: No Some AWS services don't work when you sign in using temporary credentials. For additional information, including which AWS services work with temporary credentials, see AWS services that work with IAM in the IAM User Guide. You are using temporary credentials if you sign in to the AWS Management Console using any method except a user name and password. For example, when you access AWS using your company's single sign-on (SSO) link, that process automatically creates temporary credentials. You also automatically create temporary credentials when you sign in to the console as a user and then switch roles. For more information about switching roles, see Switch from a user to an IAM role (console) in the IAM User Guide. You can manually create temporary credentials using the AWS CLI or AWS API. You can then use those temporary credentials to access AWS. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, see Temporary security credentials in IAM. Cross-service principal permissions for AMB Access Polygon Supports forward access sessions (FAS): No How Amazon Managed Blockchain (AMB) Access Polygon works with IAM 50 AMB Access Polygon Developer Guide When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. Service roles for AMB Access Polygon Supports service roles: No A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. Warning Changing the permissions for a service role might break AMB Access Polygon functionality. Edit service roles only when AMB Access Polygon provides guidance to do so. Service-linked roles for AMB Access Polygon Supports service-linked roles: No A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. For details about creating or managing service-linked roles, see AWS services that work with IAM. Find a service in the table that includes a Yes in the Service-linked role column. Choose the Yes link to view the service-linked role documentation for that service. Identity-based policy examples for Amazon Managed Blockchain (AMB) Access Polygon By default, users and roles don't have permission to create or modify AMB Access Polygon resources. They also can't perform tasks by using the AWS Management Console, AWS Command Identity-based policy examples 51 AMB Access Polygon Developer Guide Line Interface (AWS CLI), or AWS API. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. To learn how to create an IAM identity-based policy by using these example JSON policy documents, see Create IAM policies (console) in the IAM User Guide. For details about actions and resource types defined by AMB Access Polygon, including the format of the ARNs for each of the resource types, see Actions, Resources, and Condition Keys for Amazon Managed Blockchain (AMB) Access Polygon in the Service Authorization Reference. Topics • Policy best practices • Using the AMB Access Polygon console • Allow users to view their own permissions • Accessing Polygon networks |
amb-polygon-dg-019 | amb-polygon-dg.pdf | 19 | to roles, and users can assume the roles. To learn how to create an IAM identity-based policy by using these example JSON policy documents, see Create IAM policies (console) in the IAM User Guide. For details about actions and resource types defined by AMB Access Polygon, including the format of the ARNs for each of the resource types, see Actions, Resources, and Condition Keys for Amazon Managed Blockchain (AMB) Access Polygon in the Service Authorization Reference. Topics • Policy best practices • Using the AMB Access Polygon console • Allow users to view their own permissions • Accessing Polygon networks Policy best practices Identity-based policies determine whether someone can create, access, or delete AMB Access Polygon resources in your account. These actions can incur costs for your AWS account. When you create or edit identity-based policies, follow these guidelines and recommendations: • Get started with AWS managed policies and move toward least-privilege permissions – To get started granting permissions to your users and workloads, use the AWS managed policies that grant permissions for many common use cases. They are available in your AWS account. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases. For more information, see AWS managed policies or AWS managed policies for job functions in the IAM User Guide. • Apply least-privilege permissions – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as least-privilege permissions. For more information about using IAM to apply permissions, see Policies and permissions in IAM in the IAM User Guide. • Use conditions in IAM policies to further restrict access – You can add a condition to your policies to limit access to actions and resources. For example, you can write a policy condition to Identity-based policy examples 52 AMB Access Polygon Developer Guide specify that all requests must be sent using SSL. You can also use conditions to grant access to service actions if they are used through a specific AWS service, such as AWS CloudFormation. For more information, see IAM JSON policy elements: Condition in the IAM User Guide. • Use IAM Access Analyzer to validate your IAM policies to ensure secure and functional permissions – IAM Access Analyzer validates new and existing policies so that the policies adhere to the IAM policy language (JSON) and IAM best practices. IAM Access Analyzer provides more than 100 policy checks and actionable recommendations to help you author secure and functional policies. For more information, see Validate policies with IAM Access Analyzer in the IAM User Guide. • Require multi-factor authentication (MFA) – If you have a scenario that requires IAM users or a root user in your AWS account, turn on MFA for additional security. To require MFA when API operations are called, add MFA conditions to your policies. For more information, see Secure API access with MFA in the IAM User Guide. For more information about best practices in IAM, see Security best practices in IAM in the IAM User Guide. Using the AMB Access Polygon console To access the Amazon Managed Blockchain (AMB) Access Polygon console, you must have a minimum set of permissions. These permissions must allow you to list and view details about the AMB Access Polygon resources in your AWS account. If you create an identity-based policy that is more restrictive than the minimum required permissions, the console won't function as intended for entities (users or roles) with that policy. You don't need to allow minimum console permissions for users that are making calls only to the AWS CLI or the AWS API. Instead, allow access to only the actions that match the API operation that they're trying to perform. To ensure that users and roles can still use the AMB Access Polygon console, also attach the AMB Access Polygon ConsoleAccess or ReadOnly AWS managed policy to the entities. For more information, see Adding permissions to a user in the IAM User Guide. Allow users to view their own permissions This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API. Identity-based policy examples 53 AMB Access Polygon Developer Guide { "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": ["arn:aws:iam::*:user/${aws:username}"] }, { "Sid": "NavigateInConsole", "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", "iam:GetPolicy", "iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } ] } Accessing Polygon networks Note In order to access the public endpoints |
amb-polygon-dg-020 | amb-polygon-dg.pdf | 20 | that allows IAM users to view the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API. Identity-based policy examples 53 AMB Access Polygon Developer Guide { "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": ["arn:aws:iam::*:user/${aws:username}"] }, { "Sid": "NavigateInConsole", "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", "iam:GetPolicy", "iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } ] } Accessing Polygon networks Note In order to access the public endpoints for the Polygon mainnet and mainnet to make JSON-RPC calls, you will need user credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) that have the appropriate IAM permissions for AMB Access Polygon. Identity-based policy examples 54 AMB Access Polygon Developer Guide Example IAM Policy to access all Polygon Networks This example grants an IAM user in your AWS account access to all Polygon networks. { "Version": "2012-10-17", "Statement": [ { "Sid": "AccessAllPolygonNetworks", "Effect": "Allow", "Action": [ "managedblockchain:InvokeRpcPolygon*" ], "Resource": "*" } ] } Example IAM Policy to access the Polygon Mainnet network This example grants an IAM user in your AWS account access to the Polygon Mainnet network. { "Version": "2012-10-17", "Statement": [ { "Sid": "AccessPolygonTestnet", "Effect": "Allow", "Action": [ "managedblockchain:InvokeRpcPolygonMainnet" ], "Resource": "*" } ] } Identity-based policy examples 55 AMB Access Polygon Developer Guide Troubleshooting Amazon Managed Blockchain (AMB) Access Polygon identity and access Use the following information to help you diagnose and fix common issues that you might encounter when working with AMB Access Polygon and IAM. Topics • I am not authorized to perform an action in AMB Access Polygon • I am not authorized to perform iam:PassRole • I want to allow people outside of my AWS account to access my AMB Access Polygon resources I am not authorized to perform an action in AMB Access Polygon If you receive an error that you're not authorized to perform an action, your policies must be updated to allow you to perform the action. The following example error occurs when the mateojackson IAM user tries to use the console to view details about a fictional my-example-widget resource but doesn't have the fictional managedblockchain::GetWidget permissions. User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: managedblockchain::GetWidget on resource: my-example-widget In this case, the policy for the mateojackson user must be updated to allow access to the my- example-widget resource by using the managedblockchain::GetWidget action. If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. I am not authorized to perform iam:PassRole If you receive an error that you're not authorized to perform the iam:PassRole action, your policies must be updated to allow you to pass a role to AMB Access Polygon. Some AWS services allow you to pass an existing role to that service instead of creating a new service role or service-linked role. To do this, you must have permissions to pass the role to the service. Troubleshooting 56 AMB Access Polygon Developer Guide The following example error occurs when an IAM user named marymajor tries to use the console to perform an action in AMB Access Polygon. However, the action requires the service to have permissions that are granted by a service role. Mary does not have permissions to pass the role to the service. User: arn:aws:iam::123456789012:user/marymajor is not authorized to perform: iam:PassRole In this case, Mary's policies must be updated to allow her to perform the iam:PassRole action. If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. I want to allow people outside of my AWS account to access my AMB Access Polygon resources You can create a role that users in other accounts or people outside of your organization can use to access your resources. You can specify who is trusted to assume the role. For services that support resource-based policies or access control lists (ACLs), you can use those policies to grant people access to your resources. To learn more, consult the following: • To learn whether AMB Access Polygon supports these features, see How Amazon Managed Blockchain (AMB) Access Polygon works with IAM. • To learn how to provide access to your resources across AWS accounts that you own, see Providing access to an IAM user in another AWS account that you own in the IAM User Guide. • To learn how to provide access to your resources to third-party AWS accounts, see Providing access to AWS accounts owned by third parties in the IAM User Guide. • To learn how to provide access through identity federation, see Providing access to externally authenticated users (identity federation) in the IAM User Guide. • To learn the difference between using |
amb-polygon-dg-021 | amb-polygon-dg.pdf | 21 | Access Polygon works with IAM. • To learn how to provide access to your resources across AWS accounts that you own, see Providing access to an IAM user in another AWS account that you own in the IAM User Guide. • To learn how to provide access to your resources to third-party AWS accounts, see Providing access to AWS accounts owned by third parties in the IAM User Guide. • To learn how to provide access through identity federation, see Providing access to externally authenticated users (identity federation) in the IAM User Guide. • To learn the difference between using roles and resource-based policies for cross-account access, see Cross account resource access in IAM in the IAM User Guide. Troubleshooting 57 AMB Access Polygon Developer Guide Logging Amazon Managed Blockchain (AMB) Access Polygon events by using AWS CloudTrail Note Amazon Managed Blockchain (AMB) Access Polygon doesn’t support management events. Amazon Managed Blockchain runs on AWS CloudTrail, a service that provides a record of actions taken by a user, role, or an AWS service in Managed Blockchain. CloudTrail captures who invoked the AMB Access Polygon endpoints for Managed Blockchain as data plane events. If you create a properly configured trail that is subscribed to receive the desired data plane events, you can receive continuous delivery of AMB Access Polygon related CloudTrail events to an S3 bucket. Using the information that's collected by CloudTrail, you can determine that a request was made to one of the AMB Access Polygon endpoints, the IP address that the request came from, who made the request, when it was made, and other additional details. To learn more about CloudTrail, see the AWS CloudTrail User Guide. AMB Access Polygon information in CloudTrail CloudTrail is enabled on your AWS account when you create it. However, you must configure the data plane events to view who invoked the AMB Access Polygon endpoints. For an ongoing record of events in your AWS account, including events for AMB Access Polygon, create a trail. A trail enables CloudTrail to deliver log files to an S3 bucket. By default, when you create a trail in the console, the trail applies to all AWS Regions. The trail logs events from all supported Regions in the AWS partition and delivers the log files to the S3 bucket that you specify. Additionally, you can configure other AWS services to analyze further and act on the event data collected in CloudTrail logs. For more information, see the following: • Using CloudTrail to track Polygon JSON-RPCs • Overview for creating a trail • CloudTrail supported services and integrations • Configuring Amazon SNS notifications for CloudTrail AMB Access Polygon information in CloudTrail 58 AMB Access Polygon Developer Guide • Receiving CloudTrail log files from multiple Regions and Receiving CloudTrail log files from multiple accounts By analyzing the CloudTrail data events, you can monitor who invoked the AMB Access Polygon endpoints. Every event or log entry contains information about who generated the request. The identity information helps you determine the following: • Whether the request was made with root or AWS Identity and Access Management (IAM) user credentials • Whether the request was made with temporary security credentials for a role or a federated user • Whether the request was made by another AWS service For more information, see the CloudTrail userIdentity element. Understanding AMB Access Polygon log file entries For data plane events, a trail is a configuration that enables delivery of events as log files to a specified S3 bucket. Each CloudTrail log file contains one or more log entries that represent a single request from any source. These entries provide details about the requested action, including the date and time of the action, and any associated request parameters. Note CloudTrail data events in the log files aren't an ordered stack trace of the AMB Access Polygon API calls, so they don't appear in any specific order. Using CloudTrail to track Polygon JSON-RPCs You can use CloudTrail to track who in your account invoked the AMB Access Polygon endpoints and which JSON-RPC was invoked as data events. By default, when you create a trail, data events aren't logged. To record who invoked the AMB Access Polygon endpoints as CloudTrail data events, you must explicitly add the supported resources or resource types for which you want to collect activity to a trail. AMB Access Polygon supports adding data events by using the AWS Management Understanding AMB Access Polygon log file entries 59 AMB Access Polygon Developer Guide Console, AWS CLI, and SDK. For more information, see Log events by using advanced selectors in the AWS CloudTrail User Guide . To log data events in a trail, use the put-event-selectors operation after you create the trail. Use the --advanced-event-selectors option to specify the AWS::ManagedBlockchain::Network resource types in order to start |
amb-polygon-dg-022 | amb-polygon-dg.pdf | 22 | CloudTrail data events, you must explicitly add the supported resources or resource types for which you want to collect activity to a trail. AMB Access Polygon supports adding data events by using the AWS Management Understanding AMB Access Polygon log file entries 59 AMB Access Polygon Developer Guide Console, AWS CLI, and SDK. For more information, see Log events by using advanced selectors in the AWS CloudTrail User Guide . To log data events in a trail, use the put-event-selectors operation after you create the trail. Use the --advanced-event-selectors option to specify the AWS::ManagedBlockchain::Network resource types in order to start logging data events to determine who invoked the AMB Access Polygon endpoints. Example Data event log entry of all your account's AMB Access Polygon endpoints requests The following example demonstrates how to use the put-event-selectors operation to log all your account's AMB Access Polygon endpoint requests for the trail my-polygon-trail in the us- east-1 Region. aws cloudtrail put-event-selectors \ --region us-east-1 \ --trail-name my-polygon-trail \ --advanced-event-selectors '[{ "Name": "Test", "FieldSelectors": [ { "Field": "eventCategory", "Equals": ["Data"] }, { "Field": "resources.type", "Equals": ["AWS::ManagedBlockchain::Network"] } ]}]' After you subscribe, you can track usage in the S3 bucket that is connected to the trail specified in the previous example. The following result shows a CloudTrail data event log entry of the information that's collected by CloudTrail. You can determine that a Polygon JSON-RPC request was made to one of the AMB Access Polygon endpoints, the IP address that the request came from, who made the request, when it was made, and other additional details. Some values in the following example have been obfuscated for security reasons but appear fully in actual log entries. { "eventVersion": "1.09", "userIdentity": { "type": "AssumedRole", "principalId": "AROA554UO62RJ7KSB7FAX:777777777777", "arn": "arn:aws:sts::111122223333:assumed-role/Admin/777777777777", "accountId": "111122223333" }, Using CloudTrail to track Polygon JSON-RPCs 60 AMB Access Polygon Developer Guide "eventTime": "2023-04-12T19:00:22Z", "eventSource": "managedblockchain.amazonaws.com", "eventName": "gettxout", "awsRegion": "us-east-1", "sourceIPAddress": "111.222.333.444", "userAgent": "python-requests/2.28.1", "errorCode": "-", "errorMessage": "-", "requestParameters": { "jsonrpc": "2.0", "method": "gettxout", "params": [], "id": 1 }, "responseElements": null, "requestID": "DRznHHEj********", "eventID": "baeb232d-2c6b-46cd-992c-0e40********", "readOnly": true, "resources": [{ "type": "AWS::ManagedBlockchain::Network", "ARN": "arn:aws:managedblockchain:::networks/n-polygon-mainnet" }], "eventType": "AwsApiCall", "managementEvent": false, "recipientAccountId": "111122223333", "eventCategory": "Data" } Using CloudTrail to track Polygon JSON-RPCs 61 AMB Access Polygon Developer Guide Document history for the AMB Access Polygon User Guide The following table describes the documentation releases for AMB Access Polygon. Change Description Date Updated quotas for JSON- RPC The quotas that AMB Access Polygon supports for each April 12, 2024 End of support for the Mumbai testnet network Addition of the Tutorials topic Public preview supported JSON-RPC are updated. AMB Access Polygon ended support of the Mumbai testnet on April 15, 2024. AMB Access Polygon tutorials from the Community Articles section of AWS re:Post. Public preview release of the Amazon Managed Blockchain (AMB) Access Polygon service. April 10, 2024 April 9, 2024 November 24, 2023 62 |
ambq-dg-001 | ambq-dg.pdf | 1 | Developer Guide Amazon Managed Blockchain Query Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon Managed Blockchain Query Developer Guide Amazon Managed Blockchain Query: Developer Guide Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon Managed Blockchain Query Table of Contents Developer Guide What is Amazon Managed Blockchain (AMB) Query? ................................................................... 1 Are you a first-time AMB Query user? ..................................................................................................... 1 Key concepts .................................................................................................................................... 2 Considerations and limitations for using Amazon Managed Blockchain (AMB) Query ................... 2 Setting up ........................................................................................................................................ 6 Prerequisites and considerations ............................................................................................................... 6 Sign up for AWS ...................................................................................................................................... 6 Create an IAM user with appropriate permissions ................................................................................ 6 Install and configure the AWS Command Line Interface ..................................................................... 7 Use the AWS Management Console to query blockchains using AMB Query .................................. 7 Getting started ................................................................................................................................ 9 Create an IAM policy ................................................................................................................................... 9 Examples using Go ..................................................................................................................................... 10 Examples using Node.js ............................................................................................................................ 16 Examples using Python ............................................................................................................................. 20 Example using the AWS Management Console ................................................................................... 22 AMB Query use cases .................................................................................................................... 24 Query current and historical token balances ....................................................................................... 24 Retrieve historical transaction data ....................................................................................................... 24 Get all token balances for a given address .......................................................................................... 24 List events emitted for a transaction .................................................................................................... 25 Get all tokens minted by a contract ...................................................................................................... 25 List contracts and get contract information ........................................................................................ 25 AMB Query API Reference ............................................................................................................ 26 Security .......................................................................................................................................... 27 Data encryption .......................................................................................................................................... 27 Encryption in transit ............................................................................................................................ 28 Identity and access management ........................................................................................................... 28 Audience .................................................................................................................................................. 28 Authenticating with identities ............................................................................................................ 29 Managing access using policies .......................................................................................................... 32 How Amazon Managed Blockchain (AMB) Query works with IAM .............................................. 35 Identity-based policy examples ......................................................................................................... 41 Troubleshooting .................................................................................................................................... 45 iii Amazon Managed Blockchain Query Developer Guide API usage metrics .......................................................................................................................... 47 API usage metrics on Amazon CloudWatch ......................................................................................... 47 Document history .......................................................................................................................... 49 iv Amazon Managed Blockchain Query Developer Guide What is Amazon Managed Blockchain (AMB) Query? Amazon Managed Blockchain (AMB) is a fully managed service designed to help you build resilient Web3 applications on both public and private blockchains. Use AMB Access for instant and serverless access to multiple blockchains. Build your Web3-ready applications without the requirement of deploying specialized blockchain infrastructure and keeping them connected to the blockchain network. With AMB Query, you can use developer-friendly API operations to access real-time and historical data from multiple blockchains. The standardized blockchain data can be integrated with AWS services, without requiring specialized blockchain infrastructure or ETL (extract, transform, and load). All AMB features scale securely for institutional grade and mainstream consumer application builds. Amazon Managed Blockchain (AMB) Query provides serverless access to standardized, multi- blockchain datasets with developer-friendly API operations. You can use AMB Query to quickly ship applications that require data from one or more public blockchains, without requiring the overhead to parse blockchain data, trace contracts, and maintain specialized indexing infrastructure. Whether you’re analyzing historical token balances for fungible tokens or non-fungible tokens (NFTs), viewing the transaction history for a given wallet address, or performing data analytics on the distribution of native cryptocurrencies such as Ether, AMB Query gives you access to the blockchain data. Are you a first-time AMB Query user? If you are a first-time user of AMB Query, we recommend that you begin by reading the following sections: • Key concepts: Amazon Managed Blockchain (AMB) Query • Setting up Amazon Managed Blockchain (AMB) Query • Getting started with Amazon Managed Blockchain (AMB) Query • Use cases with Amazon Managed Blockchain (AMB) Query Are you a first-time AMB Query user? 1 Amazon Managed Blockchain Query Developer Guide Key concepts: Amazon Managed Blockchain (AMB) Query Note This guide assumes that you're familiar with essential blockchain concepts. These concepts include decentralization, tokens, contracts, transactions, proof-of-work, wallets, public and private keys, staking, mining, halvings, and others. Amazon Managed Blockchain (AMB) Query provides you with convenient access to multi-blockchain network data, which makes it easier for you to extract contextual data related to blockchain activity. You can use AMB Query to read data from public blockchain networks, such as Bitcoin Mainnet and Ethereum Mainnet. You can also get information, such as current and historical balances of addresses, or you can get a list of blockchain transactions for a given time period. Additionally, you can get details of a given transaction, such as transaction events, which you can further analyze or use in business logic for your applications. Considerations and limitations for using |
ambq-dg-002 | ambq-dg.pdf | 2 | provides you with convenient access to multi-blockchain network data, which makes it easier for you to extract contextual data related to blockchain activity. You can use AMB Query to read data from public blockchain networks, such as Bitcoin Mainnet and Ethereum Mainnet. You can also get information, such as current and historical balances of addresses, or you can get a list of blockchain transactions for a given time period. Additionally, you can get details of a given transaction, such as transaction events, which you can further analyze or use in business logic for your applications. Considerations and limitations for using Amazon Managed Blockchain (AMB) Query When you use AMB Query, consider the following: • Available Regions AMB Query is supported in the US East (N. Virginia) us-east-1 Region. • Service endpoints AMB Query is accessible by using the following endpoint: https://managedblockchain-query.us-east-1.amazonaws.com. • Supported blockchain networks AMB Query supports the following public blockchain networks: • Bitcoin Mainnet — The public Bitcoin blockchain network that is secured by proof-of- work consensus, and on which the Bitcoin (BTC) cryptocurrency is issued and transacted. Considerations and limitations for using Amazon Managed Blockchain (AMB) Query 2 Amazon Managed Blockchain Query Developer Guide Transactions on Mainnet have actual value (that is, they incur real costs) and are recorded on the public blockchain. • Bitcoin Testnet — The testnet for the Bitcoin Mainnet. Bitcoin (BTC) on this network is separate and distinct from Mainnet BTC, and does not usually have any value. • Ethereum Mainnet — The proof-of-stake main network for the public Ethereum blockchain. Transactions on Mainnet have actual value (that is, they incur real costs) and are recorded on the distributed ledger. • Sepolia Testnet — The testnet for the Ethereum Mainnet. Ether (ETH) on this network is separate and distinct from Mainnet ETH, and does not usually have any value. • Supported blockchain tokens and contracts AMB Query supports the following native and standard Ethereum contract tokens. • Public blockchain native tokens • Bitcoin (BTC)— This is the native token of Bitcoin-related blockchains. • Ether (ETH)— This is the native token of Ethereum-related blockchains. • Ethereum contract standards • ERC-20 Token Standard — The ERC-20 is a standard for fungible tokens. It has a property that makes each ERC-20 token exactly the same (in type and value) as another ERC-20 token minted, which means that one token is and will always be equal to all the other tokens. For more information, see the ERC-20 Token Standard on Ethereum.org. • ERC-721 Non-fungible Token Standard — The ERC-721 is a standard for non-fungible tokens (NFTs). This type of token is unique and can have a different value than another token from the same contract, possibly due to its age, rarity, or other properties. For more information, see the ERC-721 Token Standard on Ethereum.org. ERC-1155 Multi-token Standard — The ERC-1155 is a standard that creates a contract interface that can represent and control any number of fungible and non-fungible token types. In this way, the ERC-1155 token can function the same as ERC-20 and ERC-721 tokens, even functioning as both at the same time. The ERC-1155 token improves on the functionality of both the ERC-20 and ERC-721 standards, making it more efficient, while correcting obvious implementation errors. For more information, see the ERC-1155 Token Standard on Ethereum.org. • Finality Considerations and limitations for using Amazon Managed Blockchain (AMB) Query 3 Amazon Managed Blockchain Query Developer Guide In blockchains, finality means that valid transactions are unlikely to be reversed. For the Bitcoin Mainnet, AMB Query considers a transaction final after 6 blocks. For the Bitcoin Testnet, it considers a transaction final after either 6 blocks or 60 minutes, whichever comes first. For supported Ethereum networks, AMB Query considers a transaction final after 64 blocks. AMB Query's token balance and contract API operations only return data that has reached finality. However, AMB Query's transaction and transaction event API operations can return data for transactions that are confirmed on the blockchain network even if they have not yet reached finality. • NULL address not supported AMB Query does not support the NULL (0x0000000000000000000000000000000000000000) address. • Signature Version 4 signing of API calls When making calls to the AMB Query APIs, you can do so over an HTTPS connection authenticated using the Signature Version 4 signing process. This means that only authorized IAM principals in the AWS account can make AMB Query API calls. To do this, AWS credentials (an access key ID and secret access key) must be provided with the call. Important Do not embed client credentials in user-facing applications. • AMB Query supports Bitcoin transaction identifiers and transaction hashes For Bitcoin networks, AMB Query API operations support both the transaction identifier (transactionId) and the transaction hash (transactionHash). The transactionId is a double-SHA hash of the transaction not including |
ambq-dg-003 | ambq-dg.pdf | 3 | you can do so over an HTTPS connection authenticated using the Signature Version 4 signing process. This means that only authorized IAM principals in the AWS account can make AMB Query API calls. To do this, AWS credentials (an access key ID and secret access key) must be provided with the call. Important Do not embed client credentials in user-facing applications. • AMB Query supports Bitcoin transaction identifiers and transaction hashes For Bitcoin networks, AMB Query API operations support both the transaction identifier (transactionId) and the transaction hash (transactionHash). The transactionId is a double-SHA hash of the transaction not including witness data. The transactionHash is a double-SHA hash of the transaction including witness data (also known as witness transaction id). When invoking the GetTransaction or ListTransactionEvents API operations for Bitcoin networks, you can specify either the transactionId or the transactionHash. Considerations and limitations for using Amazon Managed Blockchain (AMB) Query 4 Amazon Managed Blockchain Query Developer Guide Also, all AMB Query operations on Bitcoin networks that return either a transactionId or a transactionHash will include both values as a part of the response. Considerations and limitations for using Amazon Managed Blockchain (AMB) Query 5 Amazon Managed Blockchain Query Developer Guide Setting up Amazon Managed Blockchain (AMB) Query Before you use Amazon Managed Blockchain (AMB) Query for the first time, follow the steps in this section to create an AWS account. The following section discusses how to get started using AMB Query. Prerequisites and considerations Before you use Amazon Web Services for the first time, you must have an AWS account. Sign up for AWS When you sign up for Amazon Web Services (AWS), your AWS account is automatically signed up for all AWS services, including Amazon Managed Blockchain (AMB) Query. You're charged only for the services that you use. If you have an AWS account already, go to the next step. If you don't have an AWS account, use the following procedure to create one. To create an AWS account 1. Open https://portal.aws.amazon.com/billing/signup. 2. Follow the online instructions. Part of the sign-up procedure involves receiving a phone call and entering a verification code on the phone keypad. When you sign up for an AWS account, an AWS account root user is created. The root user has access to all AWS services and resources in the account. As a security best practice, assign administrative access to a user, and use only the root user to perform tasks that require root user access. Create an IAM user with appropriate permissions To create and work with AMB Query, you must create an AWS Identity and Access Management (IAM) principal (user or group) with permissions that allow necessary Managed Blockchain actions. Prerequisites and considerations 6 Amazon Managed Blockchain Query Developer Guide Only IAM principals can make AMB Query API requests. When making calls to the AMB Query APIs, you can do so over an HTTPS connection authenticated using the Signature Version 4 signing process. This means that only authorized IAM principals in the AWS account can make AMB Query API calls. To do this, AWS credentials (an access key ID and secret access key) must be provided with the call. For information about how to create an IAM user, see Creating an IAM user in your AWS account. For more information about how to attach a permissions policy to a user, see Changing permissions for an IAM user. For an example of a permissions policy that you can use to give a user permission to work with AMB Query, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Query. Install and configure the AWS Command Line Interface If you have not already done so, install the latest AWS Command-Line Interface (CLI) to work with AWS resources from a terminal. For more information, see Installing or updating the latest version of the AWS CLI. Note For CLI access, you need an access key ID and a secret access key. Use temporary credentials instead of long-term access keys when possible. Temporary credentials include an access key ID, a secret access key, and a security token that indicates when the credentials expire. For more information, see Using temporary credentials with AWS resources in the IAM User Guide. Use the AWS Management Console to query blockchains using Amazon Managed Blockchain (AMB) Query You can access Amazon Managed Blockchain (AMB) Query and make queries on supported blockchain networks using the AWS Management Console. The following steps show how to do this: 1. Open the Amazon Managed Blockchain console at https://console.aws.amazon.com/ managedblockchain/. 2. Choose Query editor from the Query section. Install and configure the AWS Command Line Interface 7 Amazon Managed Blockchain Query Developer Guide 3. Choose from one of the supported Blockchain networks. 4. Choose the Query type you want to run. 5. Enter the relevant parameters for the |
ambq-dg-004 | ambq-dg.pdf | 4 | Use the AWS Management Console to query blockchains using Amazon Managed Blockchain (AMB) Query You can access Amazon Managed Blockchain (AMB) Query and make queries on supported blockchain networks using the AWS Management Console. The following steps show how to do this: 1. Open the Amazon Managed Blockchain console at https://console.aws.amazon.com/ managedblockchain/. 2. Choose Query editor from the Query section. Install and configure the AWS Command Line Interface 7 Amazon Managed Blockchain Query Developer Guide 3. Choose from one of the supported Blockchain networks. 4. Choose the Query type you want to run. 5. Enter the relevant parameters for the Query type you selected and Run query. AMB Query will run your query and you will see results in the Query results window. Use the AWS Management Console to query blockchains using AMB Query 8 Amazon Managed Blockchain Query Developer Guide Getting started with Amazon Managed Blockchain (AMB) Query Use the step-by-step tutorials in this section to learn how to perform tasks by using Amazon Managed Blockchain (AMB) Query. These procedures requires some prerequisites. If you are new to AMB Query, you can review the Setting up section of this guide. For more information, see Setting up Amazon Managed Blockchain (AMB) Query. Note Some variables in these examples have been deliberately obfuscated. Replace them with valid ones of your own before running these examples. Topics • Create an IAM policy to access AMB Query API operations • Make Amazon Managed Blockchain (AMB) Query API requests by using Go • Make Amazon Managed Blockchain (AMB) Query API requests by using Node.js • Make Amazon Managed Blockchain (AMB) Query API requests by using Python • Use Amazon Managed Blockchain (AMB) Query on the AWS Management Console to run the GetTokenBalance operation Create an IAM policy to access AMB Query API operations To make AMB Query API requests, you must use the user credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) that have the appropriate IAM permissions for Amazon Managed Blockchain (AMB) Query. In a terminal with the AWS CLI installed, run the following command to create an IAM policy to access AMB Query API operations: cat <<EOT > ~/amb-query-access-policy.json { "Version": "2012-10-17", "Statement": [ { "Sid" : "AMBQueryAccessPolicy", Create an IAM policy 9 Amazon Managed Blockchain Query Developer Guide "Effect": "Allow", "Action": [ "managedblockchain-query:*" ], "Resource": "*" } ] } EOT aws iam create-policy --policy-name AmazonManagedBlockchainQueryAccess --policy- document file://$HOME/amb-query-access-policy.json After you create the policy, attach that policy to an IAM user’s Role for it to take effect. In the AWS Management Console, navigate to the IAM service, and attach the policy AmazonManagedBlockchainQueryAccess to the Role assigned to the IAM user that will use the service. For more information, see Creating a Role and assigning to an IAM user. Note AWS recommends that you give access to specific API operations rather than using the wild-card *. For more information, see Accessing specific Amazon Managed Blockchain (AMB) Query API actions. Make Amazon Managed Blockchain (AMB) Query API requests by using Go With Amazon Managed Blockchain (AMB) Query, you can build applications that depend on instant access to blockchain data once it is confirmed on the blockchain, even if it has not yet reached finality. AMB Query enables several use cases such as populating the transaction history of a wallet, providing contextual information about a transaction based on its transaction hash, or obtaining the balance of a native tokens as well as of ERC-721, ERC-1155, and ERC-20 tokens. The following examples are created in the Go language and use the AMB Query API operations. For more information on Go, see the Go Documentation. For more information on the AMB Query API, see the Amazon Managed Blockchain (AMB) Query API Reference Documentation. The following examples use the ListTransactions and the GetTransaction API actions to first get a list of all transactions for a given externally owned address (EOA) on the Ethereum Examples using Go 10 Amazon Managed Blockchain Query Developer Guide Mainnet, and then the next example retrieves the transaction details for a single transaction from the list. Example — Make the ListTransactions API action using Go Copy the following code to a file named listTransactions.go in the ListTransactions directory. package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/managedblockchainquery" "time" ) func main() { // Set up a session ambQuerySession := session.Must(session.NewSessionWithOptions(session.Options{ Config: aws.Config{ Region: aws.String("us-east-1"), }, })) client := managedblockchainquery.New(ambQuerySession) // Inputs for ListTransactions API ownerAddress := "0x00000bf26964af9d7eed9e03e53415d********" network := managedblockchainquery.QueryNetworkEthereumMainnet sortOrder := managedblockchainquery.SortOrderAscending fromTime := time.Date(1971, 1, 1, 1, 1, 1, 1, time.UTC) toTime := time.Now() nonFinal := "NONFINAL" // Call ListTransactions API. Transactions that have reached finality are always returned listTransactionRequest, listTransactionResponse := client.ListTransactionsRequest(&managedblockchainquery.ListTransactionsInput{ Address: &ownerAddress, Network: &network, Sort: &managedblockchainquery.ListTransactionsSort{ SortOrder: &sortOrder, }, FromBlockchainInstant: &managedblockchainquery.BlockchainInstant{ Examples using Go 11 Amazon Managed Blockchain Query Developer Guide Time: &fromTime, }, ToBlockchainInstant: &managedblockchainquery.BlockchainInstant{ Time: &toTime, }, ConfirmationStatusFilter: &managedblockchainquery.ConfirmationStatusFilter{ Include: []*string{&nonFinal}, }, |
ambq-dg-005 | ambq-dg.pdf | 5 | func main() { // Set up a session ambQuerySession := session.Must(session.NewSessionWithOptions(session.Options{ Config: aws.Config{ Region: aws.String("us-east-1"), }, })) client := managedblockchainquery.New(ambQuerySession) // Inputs for ListTransactions API ownerAddress := "0x00000bf26964af9d7eed9e03e53415d********" network := managedblockchainquery.QueryNetworkEthereumMainnet sortOrder := managedblockchainquery.SortOrderAscending fromTime := time.Date(1971, 1, 1, 1, 1, 1, 1, time.UTC) toTime := time.Now() nonFinal := "NONFINAL" // Call ListTransactions API. Transactions that have reached finality are always returned listTransactionRequest, listTransactionResponse := client.ListTransactionsRequest(&managedblockchainquery.ListTransactionsInput{ Address: &ownerAddress, Network: &network, Sort: &managedblockchainquery.ListTransactionsSort{ SortOrder: &sortOrder, }, FromBlockchainInstant: &managedblockchainquery.BlockchainInstant{ Examples using Go 11 Amazon Managed Blockchain Query Developer Guide Time: &fromTime, }, ToBlockchainInstant: &managedblockchainquery.BlockchainInstant{ Time: &toTime, }, ConfirmationStatusFilter: &managedblockchainquery.ConfirmationStatusFilter{ Include: []*string{&nonFinal}, }, }) errors := listTransactionRequest.Send() if errors == nil { // handle API response fmt.Println(listTransactionResponse) } else { // handle API errors fmt.Println(errors) } } After you save the file, run the code by using the following command inside the ListTransactions directory: go run listTransactions.go. The output that follows resembles the following: { Transactions: [ { ConfirmationStatus: "FINAL", Network: "ETHEREUM_MAINNET", TransactionHash: "0x12345ea404b45323c0cf458ac755ecc45985fbf2b18e2996af3c8e8693354321", TransactionTimestamp: 2020-06-01 01:59:11 +0000 UTC }, { ConfirmationStatus: "FINAL", Network: "ETHEREUM_MAINNET", TransactionHash: "0x1234547c65675d867ebd2935bb7ebe0996e9ec8e432a579a4516c7113bf54321", TransactionTimestamp: 2021-09-01 20:06:59 +0000 UTC }, { Examples using Go 12 Amazon Managed Blockchain Query Developer Guide ConfirmationStatus: "NONFINAL", Network: "ETHEREUM_MAINNET", TransactionHash: "0x123459df7c1cd42336cd1c444cae0eb660ccf13ef3a159f05061232a24954321", TransactionTimestamp: 2024-01-23 17:10:11 +0000 UTC } ] } Example — Make the GetTransaction API action by using Go This example uses a transaction hash from the previous output. Copy the following code to a file named GetTransaction.go in the GetTransaction directory. package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/managedblockchainquery" ) func main() { // Set up a session ambQuerySession := session.Must(session.NewSessionWithOptions(session.Options{ Config: aws.Config{ Region: aws.String("us-east-1"), }, })) client := managedblockchainquery.New(ambQuerySession) // inputs for GetTransaction API transactionHash := "0x123452695a82868950d9db8f64dfb2f6f0ad79284a6c461d115ede8930754321" network := managedblockchainquery.QueryNetworkEthereumMainnet // Call GetTransaction API. This operation will return transaction details for all // transactions that are con#rmed on the blockchain, even if they have not // reached #nality. getTransactionRequest, getTransactionResponse := client.GetTransactionRequest(&managedblockchainquery.GetTransactionInput{ Examples using Go 13 Amazon Managed Blockchain Query Developer Guide Network: &network, TransactionHash: &transactionHash, }) errors := getTransactionRequest.Send() if errors == nil { // handle API response fmt.Println(getTransactionResponse) } else { // handle API errors fmt.Println(errors) } } After you save the file, run the code by using the following command inside the GetTransaction directory: go run GetTransaction.go. The output that follows resembles the following: { Transaction: { BlockHash: "0x000005c6a71d1afbc005a652b6ceca71cd516d97b0fc514c2a1d0f2ca3912345", BlockNumber: "11111111", CumulativeGasUsed: "5555555", EffectiveGasPrice: "44444444444", From: "0x9157f4de39ab4c657ad22b9f19997536********", GasUsed: "22222", Network: "ETHEREUM_MAINNET", NumberOfTransactions: 111, SignatureR: "0x99999894fd2df2d039b3555dab80df66753f84be475069dfaf6c6103********", SignatureS: "0x77777a101e7f37dd2dd0bf878b39080d5ecf3bf082c9bd4f40de783e********", SignatureV: 0, ConfirmationStatus: "FINAL", ExecutionStatus: "SUCCEEDED", To: "0x5555564f282bf135d62168c1e513280d********", TransactionHash: "0x123452695a82868950d9db8f64dfb2f6f0ad79284a6c461d115ede8930754321", TransactionIndex: 11, TransactionTimestamp: 2022-02-02 01:01:59 +0000 UTC } } Examples using Go 14 Amazon Managed Blockchain Query Developer Guide The GetTokenBalance API provides a way for you to get the balance of native tokens (ETH and BTC), which can be used to get the current balance of an externally owned account (EOA) at a point in time. Example — Use the GetTokenBalance API action to get the balance of a native token in Go In the following example, you use the GetTokenBalance API to get an address Ether (ETH) balance on the Ethereum Mainnet. Copy the following code to a file named GetTokenBalanceEth.go in the GetTokenBalance directory. package main import ( "fmt" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/managedblockchainquery" ) func main() { // Set up a session ambQuerySession := session.Must(session.NewSessionWithOptions(session.Options{ Config: aws.Config{ Region: aws.String("us-east-1"), }, })) client := managedblockchainquery.New(ambQuerySession) // inputs for GetTokenBalance API ownerAddress := "0xBeE510AF9804F3B459C0419826b6f225********" network := managedblockchainquery.QueryNetworkEthereumMainnet nativeTokenId := "eth" //Ether on Ethereum mainnet // call GetTokenBalance API getTokenBalanceRequest, getTokenBalanceResponse := client.GetTokenBalanceRequest(&managedblockchainquery.GetTokenBalanceInput{ TokenIdentifier: &managedblockchainquery.TokenIdentifier{ Network: &network, TokenId: &nativeTokenId, }, OwnerIdentifier: &managedblockchainquery.OwnerIdentifier{ Address: &ownerAddress, }, Examples using Go 15 Developer Guide Amazon Managed Blockchain Query }) errors := getTokenBalanceRequest.Send() if errors == nil { // process API response fmt.Println(getTokenBalanceResponse) } else { // process API errors fmt.Println(errors) } } After you save the file, run the code by using the following command inside the GetTokenBalance directory: go run GetTokenBalanceEth.go. The output that follows resembles the following: { AtBlockchainInstant: { Time: 2020-12-05 11:51:01 +0000 UTC }, Balance: "4343260710", LastTransactionHash: "0x00000ce94398e56641888f94a7d586d51664eb9271bf2b3c48297a50a0711111", LastTransactionTime: 2023-03-14 18:33:59 +0000 UTC, OwnerIdentifier: { Address: "0x12345d31750D727E6A3a7B534255BADd********" }, TokenIdentifier: { Network: "ETHEREUM_MAINNET", TokenId: "eth" } } Make Amazon Managed Blockchain (AMB) Query API requests by using Node.js To run these Node examples, the following prerequisites apply: 1. You must have node version manager (nvm) and Node.js installed on your machine. You can find installation instruction for your OS here. Examples using Node.js 16 Amazon Managed Blockchain Query Developer Guide 2. Use the node --version command and confirm that you are using Node version 14 or higher. If required, you can use the nvm install 14 command, followed by the nvm use 14 command to install version 14. 3. The environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY must contain the credentials that are associated with the account. Export these variables as strings on your client by using the following commands. Replace the highlighted values in |
ambq-dg-006 | ambq-dg.pdf | 6 | manager (nvm) and Node.js installed on your machine. You can find installation instruction for your OS here. Examples using Node.js 16 Amazon Managed Blockchain Query Developer Guide 2. Use the node --version command and confirm that you are using Node version 14 or higher. If required, you can use the nvm install 14 command, followed by the nvm use 14 command to install version 14. 3. The environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY must contain the credentials that are associated with the account. Export these variables as strings on your client by using the following commands. Replace the highlighted values in the following with appropriate values from the IAM user account. export AWS_ACCESS_KEY_ID="AKIAIOSFODNN7EXAMPLE" export AWS_SECRET_ACCESS_KEY="wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" Note • After you have completed all prerequisites, you can submit signed requests over HTTPS to access Amazon Managed Blockchain (AMB) Query API operations and make requests by using the native https module in Node.js, or you can use a third-party library such as AXIOS and retrieve data from AMB Query. • These examples use a third-party HTTP client for Node.js, but you can also use the AWS JavaScript SDK to make requests to AMB Query. • The following example shows you how to make AMB Query API requests by using Axios and the AWS SDK modules for SigV4. Copy the following package.json file into your local environment's working directory: { "name": "amb-query-examples", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { Examples using Node.js 17 Amazon Managed Blockchain Query Developer Guide "@aws-crypto/sha256-js": "^4.0.0", "@aws-sdk/credential-provider-node": "^3.360.0", "@aws-sdk/protocol-http": "^3.357.0", "@aws-sdk/signature-v4": "^3.357.0", "axios": "^1.4.0" } } Example — Retrieve the historical token balance from a specific externally owned address (EOA) by using AMB Query GetTokenBalance API You can use the GetTokenBalance API to get the balance of various tokens (for example, ERC20, ERC721, and ERC1155) and native coins (for example, ETH and BTC), which you can use to get the current balance of an externally owned account (EOA) based on a historical timestamp (Unix timestamp - seconds). In this example, you use the GetTokenBalance API to get an address balance of an ERC20 token, USDC, on the Ethereum Mainnet. To test the GetTokenBalance API, copy the following code into a file named token- balance.js, and save the file into the same working directory: const axios = require('axios').default; const SHA256 = require('@aws-crypto/sha256-js').Sha256 const defaultProvider = require('@aws-sdk/credential-provider-node').defaultProvider const HttpRequest = require('@aws-sdk/protocol-http').HttpRequest const SignatureV4 = require('@aws-sdk/signature-v4').SignatureV4 // define a signer object with AWS service name, credentials, and region const signer = new SignatureV4({ credentials: defaultProvider(), service: 'managedblockchain-query', region: 'us-east-1', sha256: SHA256, }); const queryRequest = async (path, data) => { //query endpoint let queryEndpoint = `https://managedblockchain-query.us-east-1.amazonaws.com/ ${path}`; // parse the URL into its component parts (e.g. host, path) const url = new URL(queryEndpoint); Examples using Node.js 18 Amazon Managed Blockchain Query Developer Guide // create an HTTP Request object const req = new HttpRequest({ hostname: url.hostname.toString(), path: url.pathname.toString(), body: JSON.stringify(data), method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept-Encoding': 'gzip', host: url.hostname, } }); // use AWS SignatureV4 utility to sign the request, extract headers and body const signedRequest = await signer.sign(req, { signingDate: new Date() }); try { //make the request using axios const response = await axios({...signedRequest, url: queryEndpoint, data: data}) console.log(response.data) } catch (error) { console.error('Something went wrong: ', error) throw error } } let methodArg = 'get-token-balance'; let dataArg = { " atBlockchainInstant": { "time": 1688071493 }, "ownerIdentifier": { "address": "0xf3B0073E3a7F747C7A38B36B805247B2********" // externally owned address }, "tokenIdentifier": { "contractAddress":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE********", //USDC contract address Examples using Node.js 19 Amazon Managed Blockchain Query Developer Guide "network":"ETHEREUM_MAINNET" } } //Run the query request. queryRequest(methodArg, dataArg); To run the code, open a terminal in the same directory as your files and run the following command: npm i node token-balance.js This command runs the script, passing in the arguments defined in the code to request the ERC20 USDC balance of the EOA listed on the Ethereum Mainnet. The response is similar to the following: { atBlockchainInstant: { time: 1688076218 }, balance: '140386693440144', lastUpdatedTime: { time: 1688074727 }, ownerIdentifier: { address: '0xf3b0073e3a7f747c7a38b36b805247b2********' }, tokenIdentifier: { contractAddress: '0xa0b86991c6218b36c1d19d4a2e9eb0ce********', network: 'ETHEREUM_MAINNET' } Make Amazon Managed Blockchain (AMB) Query API requests by using Python To run these Python examples, the following prerequisites apply: 1. You must have Python installed on your machine. You can find installation instruction for your OS here. 2. Install the AWS SDK for Python (Boto3) . 3. Install the AWS Command Line Interface and run the command aws configure to set the variables for your Access Key ID, Secret Access Key, and Region. Examples using Python 20 Amazon Managed Blockchain Query Developer Guide After you have completed all prerequisites, you can use the AWS SDK for Python over HTTPS to make Amazon Managed Blockchain (AMB) Query API requests. The following |
ambq-dg-007 | ambq-dg.pdf | 7 | To run these Python examples, the following prerequisites apply: 1. You must have Python installed on your machine. You can find installation instruction for your OS here. 2. Install the AWS SDK for Python (Boto3) . 3. Install the AWS Command Line Interface and run the command aws configure to set the variables for your Access Key ID, Secret Access Key, and Region. Examples using Python 20 Amazon Managed Blockchain Query Developer Guide After you have completed all prerequisites, you can use the AWS SDK for Python over HTTPS to make Amazon Managed Blockchain (AMB) Query API requests. The following Python example uses modules from boto3 to send requests affixed with the required SigV4 headers to the AMB Query ListTransactionEvents API operation. This example retrieves a list of events emitted by a given transaction on the Ethereum Mainnet. Copy the following list-transaction-events.py file into your local environment's working directory: import json from botocore.auth import SigV4Auth from botocore.awsrequest import AWSRequest from botocore.session import Session from botocore.httpsession import URLLib3Session def signed_request(url, method, params, service, region): session = Session() sigv4 = SigV4Auth(session.get_credentials(), service, region) data = json.dumps(params) request = AWSRequest(method, url, data=data) sigv4.add_auth(request) http_session = URLLib3Session() response = http_session.send(request.prepare()) return(response) url = 'https://managedblockchain-query.us-east-1.amazonaws.com/list-transaction-events' method = 'POST' params = { 'network': 'ETHEREUM_MAINNET', 'transactionHash': '0x125714bb4db48757007fff2671b37637bbfd6d47b3a4757ebbd0c5222984f905' } service = 'managedblockchain-query' region = 'us-east-1' # Call the listTransactionEvents operation. This operation will return transaction details for # all transactions that are con#rmed on the blockchain, even if they have not reached # #nality. listTransactionEvents = signed_request(url, method, params, service, region) Examples using Python 21 Amazon Managed Blockchain Query Developer Guide print(json.loads(listTransactionEvents.content.decode('utf-8'))) To run the sample code to ListTransactionEvents, save the file in your working directory and then run the command python3 list-transaction-events.py. This command runs the script, passing in the arguments defined in the code to request the events associated with the given transaction hash on the Ethereum Mainnet. The response is similar to the following: { 'events': [ { 'contractAddress': '0x95ad61b0a150d79219dcf64e1e6cc01f********', 'eventType': 'ERC20_TRANSFER', 'from': '0xab5801a7d398351b8be11c439e05c5b3********', 'network': 'ETHEREUM_MAINNET', 'to': '0xdead0000000000000000420694206942********', 'transactionHash': '0x125714bb4db48757007fff2671b37637bbfd6d47b3a4757ebbd0c522********', 'value': '410241996771871894771826174755464' } ] } Use Amazon Managed Blockchain (AMB) Query on the AWS Management Console to run the GetTokenBalance operation The following example shows how to get a token's balance on the Ethereum Mainnet using Amazon Managed Blockchain (AMB) Query on the AWS Management Console Example 1. Open the Amazon Managed Blockchain console at https://console.aws.amazon.com/ managedblockchain/. 2. Choose Query editor from the Query section. 3. Choose ETHEREUM_MAINNET as the Blockchain network. 4. Choose GetTokenBalance as the Query type. 5. 6. Enter your Blockchain address for the token. Enter the Contract address for the token. Example using the AWS Management Console 22 Amazon Managed Blockchain Query Developer Guide 7. Enter the optional Token ID for the token. 8. Choose the At date for the token balance. 9. Enter the optional At time for the token balance. 10. Choose Run query. AMB Query will run your query and you will see results in the Query results window. Example using the AWS Management Console 23 Amazon Managed Blockchain Query Developer Guide Use cases with Amazon Managed Blockchain (AMB) Query This topic provides a list AMB Query use cases. Topics • Query current and historical token balances • Retrieve historical transaction data • Get all token balances for a given address • List events emitted for a transaction • Get all tokens minted by a contract • List contracts and get contract information Query current and historical token balances The GetTokenBalance API gets the balance of supported tokens (ERC20, ERC721, ERC1155) and native coins (ETH, BTC) to get the current or a historical balance by using a universal timestamp (Unix timestamp, in seconds) of externally owned accounts (EOAs). For example, you can use the GetTokenBalance API operation to get an address balance of the ERC20 token, USDC, on the Ethereum Mainnet. You can also batch-retrieve balances of tokens and native coins by using the BatchGetTokenBalance API operation. For more information, see the Amazon Managed Blockchain (AMB) Query Reference Guide. Retrieve historical transaction data With Amazon Managed Blockchain (AMB) Query, you can retrieve historical data from public blockchains such as Ethereum and Bitcoin. This features enables several use cases, such as retrieving a transaction history on a blockchain wallet or providing contextual information about a transaction based on its transaction hash. You can use the ListTransactions API operation to get a list of transactions for a given externally owned address (EOA) on the Ethereum Mainnet, and then you can use the GetTransaction API operation to retrieve the transaction details for a single transaction from the list. For more information, see the Amazon Managed Blockchain (AMB) Query Reference Guide. Query current and historical token balances 24 Amazon Managed Blockchain Query Developer Guide Get all token balances for a given address You can use the ListTokenBalances API operation to get balances |
ambq-dg-008 | ambq-dg.pdf | 8 | or providing contextual information about a transaction based on its transaction hash. You can use the ListTransactions API operation to get a list of transactions for a given externally owned address (EOA) on the Ethereum Mainnet, and then you can use the GetTransaction API operation to retrieve the transaction details for a single transaction from the list. For more information, see the Amazon Managed Blockchain (AMB) Query Reference Guide. Query current and historical token balances 24 Amazon Managed Blockchain Query Developer Guide Get all token balances for a given address You can use the ListTokenBalances API operation to get balances on wallets, user interfaces, web3 utilities, and more. This API operation returns a list of all balances for an address across tokens (ERC20, ERC721, ERC1155) and native coins (ETH, BTC) on a given public blockchain by using a single API operation. For example, you can provide an externally owned address (EOA) and a network (the Ethereum Mainnet), and you can receive a list of tokens and native coin balances in the response. For more information, see the Amazon Managed Blockchain (AMB) Query Reference Guide. List events emitted for a transaction You can use the ListTransactionEvents API operation to retrieve a list of contract events that are emitted as a result of a given transaction, identified by its hash (transaction identifier). For example, you can use ListTransactionEvents to retrieve the resulting events of a transaction that calls a function of an ERC20 token contract on the Ethereum Blockchain, such as a Transfer event or a Withdrawal event from the ERC20 contract. For more information, see the Amazon Managed Blockchain (AMB) Query Reference Guide. Get all tokens minted by a contract You can use the ListTokenBalances API operation to return a list of all supported tokens (ERC20, ERC721, ERC1155) minted by a contract when passed the contract address as input. For example, you can retrieve information related to non-fungible tokens (NFTs) minted by the ERC721 contract standard on the Ethereum blockchain by using the ListTokenBalances API operation. For more information, see the Amazon Managed Blockchain (AMB) Query Reference Guide. List contracts and get contract information You can use the ListAssetContracts API operation to list ERC-721, ERC-1155, or ERC-20 contracts deployed by a given address. Additionally, if you have the contract address, you can use the GetAssetContract API operation to retrieve the contract's properties, such as the contract type deployer address, and relevant token metadata. For more information, see the Amazon Managed Blockchain (AMB) Query Reference Guide. Get all token balances for a given address 25 Amazon Managed Blockchain Query Developer Guide Amazon Managed Blockchain (AMB) Query API Reference Amazon Managed Blockchain (AMB) Query provides API operations for querying supported blockchains. This includes APIs for querying tokens, transactions, and contracts. For more information, see the AMB Query API Reference . 26 Amazon Managed Blockchain Query Developer Guide Security in Amazon Managed Blockchain (AMB) Query Cloud security at AWS is of the highest priority. As an AWS customer, you benefit from data centers and network architectures that are built to meet the requirements of the most security-sensitive organizations. Security is a shared responsibility between AWS and you. The shared responsibility model describes this as both security of the cloud and security in the cloud: • Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. Third- party auditors regularly test and verify the effectiveness of our security as part of the AWS Compliance Programs. To learn about the compliance programs that apply to Amazon Managed Blockchain (AMB) Query, see AWS Services in Scope by Compliance Program. • Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors, including the sensitivity of your data, your company’s requirements, and applicable laws and regulations. To provide data protection, authentication, and access control, Amazon Managed Blockchain uses AWS features and the features of the open-source framework running in Managed Blockchain. This documentation helps you understand how to apply the shared responsibility model when using AMB Query. The following topics show you how to configure AMB Query to meet your security and compliance objectives. You can also learn how to use other AWS services that help you to monitor and secure your AMB Query resources. Topics • Data encryption • Identity and access management for Amazon Managed Blockchain (AMB) Query Data encryption Data encryption helps prevent unauthorized users from reading data from a blockchain network and the associated data storage systems. This includes data that might be intercepted as it travels the network, known as data in transit. Data encryption 27 Amazon Managed Blockchain Query Encryption in transit Developer Guide By default, Managed Blockchain uses |
ambq-dg-009 | ambq-dg.pdf | 9 | AMB Query to meet your security and compliance objectives. You can also learn how to use other AWS services that help you to monitor and secure your AMB Query resources. Topics • Data encryption • Identity and access management for Amazon Managed Blockchain (AMB) Query Data encryption Data encryption helps prevent unauthorized users from reading data from a blockchain network and the associated data storage systems. This includes data that might be intercepted as it travels the network, known as data in transit. Data encryption 27 Amazon Managed Blockchain Query Encryption in transit Developer Guide By default, Managed Blockchain uses an HTTPS/TLS connection to encrypt all the data that's transmitted from the AWS CLI client to the AWS service endpoints. Identity and access management for Amazon Managed Blockchain (AMB) Query AWS Identity and Access Management (IAM) is an AWS service that helps an administrator securely control access to AWS resources. IAM administrators control who can be authenticated (signed in) and authorized (have permissions) to use AMB Query resources. IAM is an AWS service that you can use with no additional charge. Topics • Audience • Authenticating with identities • Managing access using policies • How Amazon Managed Blockchain (AMB) Query works with IAM • Identity-based policy examples for Amazon Managed Blockchain (AMB) Query • Troubleshooting Amazon Managed Blockchain (AMB) Query identity and access Audience How you use AWS Identity and Access Management (IAM) differs, depending on the work that you do in AMB Query. Service user – If you use the AMB Query service to do your job, then your administrator provides you with the credentials and permissions that you need. As you use more AMB Query features to do your work, you might need additional permissions. Understanding how access is managed can help you request the right permissions from your administrator. If you cannot access a feature in AMB Query, see Troubleshooting Amazon Managed Blockchain (AMB) Query identity and access. Service administrator – If you're in charge of AMB Query resources at your company, you probably have full access to AMB Query. It's your job to determine which AMB Query features and resources your service users should access. You must then submit requests to your IAM administrator to change the permissions of your service users. Review the information on this page to understand Encryption in transit 28 Amazon Managed Blockchain Query Developer Guide the basic concepts of IAM. To learn more about how your company can use IAM with AMB Query, see How Amazon Managed Blockchain (AMB) Query works with IAM. IAM administrator – If you're an IAM administrator, you might want to learn details about how you can write policies to manage access to AMB Query. To view example AMB Query identity- based policies that you can use in IAM, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Query. Authenticating with identities Authentication is how you sign in to AWS using your identity credentials. You must be authenticated (signed in to AWS) as the AWS account root user, as an IAM user, or by assuming an IAM role. You can sign in to AWS as a federated identity by using credentials provided through an identity source. AWS IAM Identity Center (IAM Identity Center) users, your company's single sign-on authentication, and your Google or Facebook credentials are examples of federated identities. When you sign in as a federated identity, your administrator previously set up identity federation using IAM roles. When you access AWS by using federation, you are indirectly assuming a role. Depending on the type of user you are, you can sign in to the AWS Management Console or the AWS access portal. For more information about signing in to AWS, see How to sign in to your AWS account in the AWS Sign-In User Guide. If you access AWS programmatically, AWS provides a software development kit (SDK) and a command line interface (CLI) to cryptographically sign your requests by using your credentials. If you don't use AWS tools, you must sign requests yourself. For more information about using the recommended method to sign requests yourself, see AWS Signature Version 4 for API requests in the IAM User Guide. Regardless of the authentication method that you use, you might be required to provide additional security information. For example, AWS recommends that you use multi-factor authentication (MFA) to increase the security of your account. To learn more, see Multi-factor authentication in the AWS IAM Identity Center User Guide and AWS Multi-factor authentication in IAM in the IAM User Guide. AWS account root user When you create an AWS account, you begin with one sign-in identity that has complete access to all AWS services and resources in the account. This identity is called the AWS account root user and Authenticating with identities 29 Amazon Managed Blockchain Query Developer Guide |
ambq-dg-010 | ambq-dg.pdf | 10 | you might be required to provide additional security information. For example, AWS recommends that you use multi-factor authentication (MFA) to increase the security of your account. To learn more, see Multi-factor authentication in the AWS IAM Identity Center User Guide and AWS Multi-factor authentication in IAM in the IAM User Guide. AWS account root user When you create an AWS account, you begin with one sign-in identity that has complete access to all AWS services and resources in the account. This identity is called the AWS account root user and Authenticating with identities 29 Amazon Managed Blockchain Query Developer Guide is accessed by signing in with the email address and password that you used to create the account. We strongly recommend that you don't use the root user for your everyday tasks. Safeguard your root user credentials and use them to perform the tasks that only the root user can perform. For the complete list of tasks that require you to sign in as the root user, see Tasks that require root user credentials in the IAM User Guide. Federated identity As a best practice, require human users, including users that require administrator access, to use federation with an identity provider to access AWS services by using temporary credentials. A federated identity is a user from your enterprise user directory, a web identity provider, the AWS Directory Service, the Identity Center directory, or any user that accesses AWS services by using credentials provided through an identity source. When federated identities access AWS accounts, they assume roles, and the roles provide temporary credentials. For centralized access management, we recommend that you use AWS IAM Identity Center. You can create users and groups in IAM Identity Center, or you can connect and synchronize to a set of users and groups in your own identity source for use across all your AWS accounts and applications. For information about IAM Identity Center, see What is IAM Identity Center? in the AWS IAM Identity Center User Guide. IAM users and groups An IAM user is an identity within your AWS account that has specific permissions for a single person or application. Where possible, we recommend relying on temporary credentials instead of creating IAM users who have long-term credentials such as passwords and access keys. However, if you have specific use cases that require long-term credentials with IAM users, we recommend that you rotate access keys. For more information, see Rotate access keys regularly for use cases that require long- term credentials in the IAM User Guide. An IAM group is an identity that specifies a collection of IAM users. You can't sign in as a group. You can use groups to specify permissions for multiple users at a time. Groups make permissions easier to manage for large sets of users. For example, you could have a group named IAMAdmins and give that group permissions to administer IAM resources. Users are different from roles. A user is uniquely associated with one person or application, but a role is intended to be assumable by anyone who needs it. Users have permanent long-term credentials, but roles provide temporary credentials. To learn more, see Use cases for IAM users in the IAM User Guide. Authenticating with identities 30 Amazon Managed Blockchain Query Developer Guide IAM roles An IAM role is an identity within your AWS account that has specific permissions. It is similar to an IAM user, but is not associated with a specific person. To temporarily assume an IAM role in the AWS Management Console, you can switch from a user to an IAM role (console). You can assume a role by calling an AWS CLI or AWS API operation or by using a custom URL. For more information about methods for using roles, see Methods to assume a role in the IAM User Guide. IAM roles with temporary credentials are useful in the following situations: • Federated user access – To assign permissions to a federated identity, you create a role and define permissions for the role. When a federated identity authenticates, the identity is associated with the role and is granted the permissions that are defined by the role. For information about roles for federation, see Create a role for a third-party identity provider (federation) in the IAM User Guide. If you use IAM Identity Center, you configure a permission set. To control what your identities can access after they authenticate, IAM Identity Center correlates the permission set to a role in IAM. For information about permissions sets, see Permission sets in the AWS IAM Identity Center User Guide. • Temporary IAM user permissions – An IAM user or role can assume an IAM role to temporarily take on different permissions for a specific task. • Cross-account access – You can use an IAM role to |
ambq-dg-011 | ambq-dg.pdf | 11 | Create a role for a third-party identity provider (federation) in the IAM User Guide. If you use IAM Identity Center, you configure a permission set. To control what your identities can access after they authenticate, IAM Identity Center correlates the permission set to a role in IAM. For information about permissions sets, see Permission sets in the AWS IAM Identity Center User Guide. • Temporary IAM user permissions – An IAM user or role can assume an IAM role to temporarily take on different permissions for a specific task. • Cross-account access – You can use an IAM role to allow someone (a trusted principal) in a different account to access resources in your account. Roles are the primary way to grant cross- account access. However, with some AWS services, you can attach a policy directly to a resource (instead of using a role as a proxy). To learn the difference between roles and resource-based policies for cross-account access, see Cross account resource access in IAM in the IAM User Guide. • Cross-service access – Some AWS services use features in other AWS services. For example, when you make a call in a service, it's common for that service to run applications in Amazon EC2 or store objects in Amazon S3. A service might do this using the calling principal's permissions, using a service role, or using a service-linked role. • Forward access sessions (FAS) – When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. Authenticating with identities 31 Amazon Managed Blockchain Query Developer Guide • Service role – A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. • Service-linked role – A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. • Applications running on Amazon EC2 – You can use an IAM role to manage temporary credentials for applications that are running on an EC2 instance and making AWS CLI or AWS API requests. This is preferable to storing access keys within the EC2 instance. To assign an AWS role to an EC2 instance and make it available to all of its applications, you create an instance profile that is attached to the instance. An instance profile contains the role and enables programs that are running on the EC2 instance to get temporary credentials. For more information, see Use an IAM role to grant permissions to applications running on Amazon EC2 instances in the IAM User Guide. Managing access using policies You control access in AWS by creating policies and attaching them to AWS identities or resources. A policy is an object in AWS that, when associated with an identity or resource, defines their permissions. AWS evaluates these policies when a principal (user, root user, or role session) makes a request. Permissions in the policies determine whether the request is allowed or denied. Most policies are stored in AWS as JSON documents. For more information about the structure and contents of JSON policy documents, see Overview of JSON policies in the IAM User Guide. Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. By default, users and roles have no permissions. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. IAM policies define permissions for an action regardless of the method that you use to perform the operation. For example, suppose that you have a policy that allows the iam:GetRole action. A user with that policy can get role information from the AWS Management Console, the AWS CLI, or the AWS API. |
ambq-dg-012 | ambq-dg.pdf | 12 | and under what conditions. By default, users and roles have no permissions. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. IAM policies define permissions for an action regardless of the method that you use to perform the operation. For example, suppose that you have a policy that allows the iam:GetRole action. A user with that policy can get role information from the AWS Management Console, the AWS CLI, or the AWS API. Managing access using policies 32 Amazon Managed Blockchain Query Identity-based policies Developer Guide Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. Identity-based policies can be further categorized as inline policies or managed policies. Inline policies are embedded directly into a single user, group, or role. Managed policies are standalone policies that you can attach to multiple users, groups, and roles in your AWS account. Managed policies include AWS managed policies and customer managed policies. To learn how to choose between a managed policy or an inline policy, see Choose between managed policies and inline policies in the IAM User Guide. Resource-based policies Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must specify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. Resource-based policies are inline policies that are located in that service. You can't use AWS managed policies from IAM in a resource-based policy. Access control lists (ACLs) Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. Amazon S3, AWS WAF, and Amazon VPC are examples of services that support ACLs. To learn more about ACLs, see Access control list (ACL) overview in the Amazon Simple Storage Service Developer Guide. Managing access using policies 33 Amazon Managed Blockchain Query Other policy types Developer Guide AWS supports additional, less-common policy types. These policy types can set the maximum permissions granted to you by the more common policy types. • Permissions boundaries – A permissions boundary is an advanced feature in which you set the maximum permissions that an identity-based policy can grant to an IAM entity (IAM user or role). You can set a permissions boundary for an entity. The resulting permissions are the intersection of an entity's identity-based policies and its permissions boundaries. Resource-based policies that specify the user or role in the Principal field are not limited by the permissions boundary. An explicit deny in any of these policies overrides the allow. For more information about permissions boundaries, see Permissions boundaries for IAM entities in the IAM User Guide. • Service control policies (SCPs) – SCPs are JSON policies that specify the maximum permissions for an organization or organizational unit (OU) in AWS Organizations. AWS Organizations is a service for grouping and centrally managing multiple AWS accounts that your business owns. If you enable all features in an organization, then you can apply service control policies (SCPs) to any or all of your accounts. The SCP limits permissions for entities in member accounts, including each AWS account root user. For more information about Organizations and SCPs, see Service control policies in the AWS Organizations User Guide. • Resource control policies (RCPs) – RCPs are JSON policies that you can use to set the maximum available permissions for resources in your accounts without updating the IAM policies attached to each resource that you own. The RCP limits permissions for resources in member accounts and can impact the effective permissions for identities, including the AWS account root user, regardless of whether they belong to your organization. For more information about Organizations and RCPs, including a list of AWS services that support RCPs, see Resource control policies (RCPs) in the AWS Organizations User Guide. • Session policies – Session policies are advanced policies that you pass as a parameter when you programmatically create a temporary session for a role or federated user. |
ambq-dg-013 | ambq-dg.pdf | 13 | your accounts without updating the IAM policies attached to each resource that you own. The RCP limits permissions for resources in member accounts and can impact the effective permissions for identities, including the AWS account root user, regardless of whether they belong to your organization. For more information about Organizations and RCPs, including a list of AWS services that support RCPs, see Resource control policies (RCPs) in the AWS Organizations User Guide. • Session policies – Session policies are advanced policies that you pass as a parameter when you programmatically create a temporary session for a role or federated user. The resulting session's permissions are the intersection of the user or role's identity-based policies and the session policies. Permissions can also come from a resource-based policy. An explicit deny in any of these policies overrides the allow. For more information, see Session policies in the IAM User Guide. Managing access using policies 34 Amazon Managed Blockchain Query Multiple policy types Developer Guide When multiple types of policies apply to a request, the resulting permissions are more complicated to understand. To learn how AWS determines whether to allow a request when multiple policy types are involved, see Policy evaluation logic in the IAM User Guide. How Amazon Managed Blockchain (AMB) Query works with IAM Before you use IAM to manage access to AMB Query, learn what IAM features are available to use with AMB Query. IAM features you can use with Amazon Managed Blockchain (AMB) Query IAM feature AMB Query support Identity-based policies Resource-based policies Policy actions Policy resources Policy condition keys ACLs ABAC (tags in policies) Temporary credentials Principal permissions Service roles Service-linked roles Yes No Yes No No No No Yes Yes No No To get a high-level view of how AMB Query and other AWS services work with most IAM features, see AWS services that work with IAM in the IAM User Guide. How Amazon Managed Blockchain (AMB) Query works with IAM 35 Amazon Managed Blockchain Query Developer Guide Identity-based policies for AMB Query Supports identity-based policies: Yes Identity-based policies are JSON permissions policy documents that you can attach to an identity, such as an IAM user, group of users, or role. These policies control what actions users and roles can perform, on which resources, and under what conditions. To learn how to create an identity-based policy, see Define custom IAM permissions with customer managed policies in the IAM User Guide. With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. You can't specify the principal in an identity-based policy because it applies to the user or role to which it is attached. To learn about all of the elements that you can use in a JSON policy, see IAM JSON policy elements reference in the IAM User Guide. Identity-based policy examples for AMB Query To view examples of AMB Query identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Query. Resource-based policies within AMB Query Supports resource-based policies: No Resource-based policies are JSON policy documents that you attach to a resource. Examples of resource-based policies are IAM role trust policies and Amazon S3 bucket policies. In services that support resource-based policies, service administrators can use them to control access to a specific resource. For the resource where the policy is attached, the policy defines what actions a specified principal can perform on that resource and under what conditions. You must specify a principal in a resource-based policy. Principals can include accounts, users, roles, federated users, or AWS services. To enable cross-account access, you can specify an entire account or IAM entities in another account as the principal in a resource-based policy. Adding a cross-account principal to a resource- based policy is only half of establishing the trust relationship. When the principal and the resource are in different AWS accounts, an IAM administrator in the trusted account must also grant the principal entity (user or role) permission to access the resource. They grant permission by attaching an identity-based policy to the entity. However, if a resource-based policy grants access How Amazon Managed Blockchain (AMB) Query works with IAM 36 Amazon Managed Blockchain Query Developer Guide to a principal in the same account, no additional identity-based policy is required. For more information, see Cross account resource access in IAM in the IAM User Guide. Policy actions for AMB Query Supports policy actions: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Action element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated |
ambq-dg-014 | ambq-dg.pdf | 14 | Blockchain Query Developer Guide to a principal in the same account, no additional identity-based policy is required. For more information, see Cross account resource access in IAM in the IAM User Guide. Policy actions for AMB Query Supports policy actions: Yes Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Action element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated AWS API operation. There are some exceptions, such as permission-only actions that don't have a matching API operation. There are also some operations that require multiple actions in a policy. These additional actions are called dependent actions. Include actions in a policy to grant permissions to perform the associated operation. To see a list of AMB Query actions, see Actions Defined by Amazon Managed Blockchain (AMB) Query in the Service Authorization Reference. Policy actions in AMB Query use the following prefix before the action: managedblockchain-query: To specify multiple actions in a single statement, separate them with commas. "Action": [ "managedblockchain-query::ListTransaction", "managedblockchain-query::GetTransaction" ] To view examples of AMB Query identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Query. Policy resources for AMB Query Supports policy resources: No How Amazon Managed Blockchain (AMB) Query works with IAM 37 Amazon Managed Blockchain Query Developer Guide Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Resource JSON policy element specifies the object or objects to which the action applies. Statements must include either a Resource or a NotResource element. As a best practice, specify a resource using its Amazon Resource Name (ARN). You can do this for actions that support a specific resource type, known as resource-level permissions. For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to indicate that the statement applies to all resources. "Resource": "*" To see a list of AMB Query resource types and their ARNs, see Resources Defined by Amazon Managed Blockchain (AMB) Query in the Service Authorization Reference. To learn with which actions you can specify the ARN of each resource, see Actions Defined by Amazon Managed Blockchain (AMB) Query . To view examples of AMB Query identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Query. Policy condition keys for AMB Query Supports service-specific policy condition keys: No Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions. The Condition element (or Condition block) lets you specify conditions in which a statement is in effect. The Condition element is optional. You can create conditional expressions that use condition operators, such as equals or less than, to match the condition in the policy with values in the request. If you specify multiple Condition elements in a statement, or multiple keys in a single Condition element, AWS evaluates them using a logical AND operation. If you specify multiple values for a single condition key, AWS evaluates the condition using a logical OR operation. All of the conditions must be met before the statement's permissions are granted. How Amazon Managed Blockchain (AMB) Query works with IAM 38 Amazon Managed Blockchain Query Developer Guide You can also use placeholder variables when you specify conditions. For example, you can grant an IAM user permission to access a resource only if it is tagged with their IAM user name. For more information, see IAM policy elements: variables and tags in the IAM User Guide. AWS supports global condition keys and service-specific condition keys. To see all AWS global condition keys, see AWS global condition context keys in the IAM User Guide. To see a list of AMB Query condition keys, see Condition Keys for Amazon Managed Blockchain (AMB) Query in the Service Authorization Reference. To learn with which actions and resources you can use a condition key, see Actions Defined by Amazon Managed Blockchain (AMB) Query . To view examples of AMB Query identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Query. ACLs in AMB Query Supports ACLs: No Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. ABAC with AMB Query Supports ABAC (tags in policies): No Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes. In AWS, these attributes are called tags. You can attach tags to IAM entities (users or |
ambq-dg-015 | ambq-dg.pdf | 15 | . To view examples of AMB Query identity-based policies, see Identity-based policy examples for Amazon Managed Blockchain (AMB) Query. ACLs in AMB Query Supports ACLs: No Access control lists (ACLs) control which principals (account members, users, or roles) have permissions to access a resource. ACLs are similar to resource-based policies, although they do not use the JSON policy document format. ABAC with AMB Query Supports ABAC (tags in policies): No Attribute-based access control (ABAC) is an authorization strategy that defines permissions based on attributes. In AWS, these attributes are called tags. You can attach tags to IAM entities (users or roles) and to many AWS resources. Tagging entities and resources is the first step of ABAC. Then you design ABAC policies to allow operations when the principal's tag matches the tag on the resource that they are trying to access. ABAC is helpful in environments that are growing rapidly and helps with situations where policy management becomes cumbersome. To control access based on tags, you provide tag information in the condition element of a policy using the aws:ResourceTag/key-name, aws:RequestTag/key-name, or aws:TagKeys condition keys. If a service supports all three condition keys for every resource type, then the value is Yes for the service. If a service supports all three condition keys for only some resource types, then the value is Partial. How Amazon Managed Blockchain (AMB) Query works with IAM 39 Amazon Managed Blockchain Query Developer Guide For more information about ABAC, see Define permissions with ABAC authorization in the IAM User Guide. To view a tutorial with steps for setting up ABAC, see Use attribute-based access control (ABAC) in the IAM User Guide. Using temporary credentials with AMB Query Supports temporary credentials: Yes Some AWS services don't work when you sign in using temporary credentials. For additional information, including which AWS services work with temporary credentials, see AWS services that work with IAM in the IAM User Guide. You are using temporary credentials if you sign in to the AWS Management Console using any method except a user name and password. For example, when you access AWS using your company's single sign-on (SSO) link, that process automatically creates temporary credentials. You also automatically create temporary credentials when you sign in to the console as a user and then switch roles. For more information about switching roles, see Switch from a user to an IAM role (console) in the IAM User Guide. You can manually create temporary credentials using the AWS CLI or AWS API. You can then use those temporary credentials to access AWS. AWS recommends that you dynamically generate temporary credentials instead of using long-term access keys. For more information, see Temporary security credentials in IAM. Cross-service principal permissions for AMB Query Supports forward access sessions (FAS): Yes When you use an IAM user or role to perform actions in AWS, you are considered a principal. When you use some services, you might perform an action that then initiates another action in a different service. FAS uses the permissions of the principal calling an AWS service, combined with the requesting AWS service to make requests to downstream services. FAS requests are only made when a service receives a request that requires interactions with other AWS services or resources to complete. In this case, you must have permissions to perform both actions. For policy details when making FAS requests, see Forward access sessions. Service roles for AMB Query Supports service roles: No How Amazon Managed Blockchain (AMB) Query works with IAM 40 Amazon Managed Blockchain Query Developer Guide A service role is an IAM role that a service assumes to perform actions on your behalf. An IAM administrator can create, modify, and delete a service role from within IAM. For more information, see Create a role to delegate permissions to an AWS service in the IAM User Guide. Warning Changing the permissions for a service role might break AMB Query functionality. Edit service roles only when AMB Query provides guidance to do so. Service-linked roles for AMB Query Supports service-linked roles: No A service-linked role is a type of service role that is linked to an AWS service. The service can assume the role to perform an action on your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. For details about creating or managing service-linked roles, see AWS services that work with IAM. Find a service in the table that includes a Yes in the Service-linked role column. Choose the Yes link to view the service-linked role documentation for that service. Identity-based policy examples for Amazon Managed Blockchain (AMB) Query By default, users and roles don't have permission to create or modify AMB Query resources. They also can't perform tasks |
ambq-dg-016 | ambq-dg.pdf | 16 | your behalf. Service-linked roles appear in your AWS account and are owned by the service. An IAM administrator can view, but not edit the permissions for service-linked roles. For details about creating or managing service-linked roles, see AWS services that work with IAM. Find a service in the table that includes a Yes in the Service-linked role column. Choose the Yes link to view the service-linked role documentation for that service. Identity-based policy examples for Amazon Managed Blockchain (AMB) Query By default, users and roles don't have permission to create or modify AMB Query resources. They also can't perform tasks by using the AWS Management Console, AWS Command Line Interface (AWS CLI), or AWS API. To grant users permission to perform actions on the resources that they need, an IAM administrator can create IAM policies. The administrator can then add the IAM policies to roles, and users can assume the roles. To learn how to create an IAM identity-based policy by using these example JSON policy documents, see Create IAM policies (console) in the IAM User Guide. For details about actions and resource types defined by AMB Query, including the format of the ARNs for each of the resource types, see Actions, Resources, and Condition Keys for Amazon Managed Blockchain (AMB) Query in the Service Authorization Reference. Identity-based policy examples 41 Amazon Managed Blockchain Query Topics • Policy best practices • Allow users to view their own permissions • Accessing specific Amazon Managed Blockchain (AMB) Query API actions Policy best practices Developer Guide Identity-based policies determine whether someone can create, access, or delete AMB Query resources in your account. These actions can incur costs for your AWS account. When you create or edit identity-based policies, follow these guidelines and recommendations: • Get started with AWS managed policies and move toward least-privilege permissions – To get started granting permissions to your users and workloads, use the AWS managed policies that grant permissions for many common use cases. They are available in your AWS account. We recommend that you reduce permissions further by defining AWS customer managed policies that are specific to your use cases. For more information, see AWS managed policies or AWS managed policies for job functions in the IAM User Guide. • Apply least-privilege permissions – When you set permissions with IAM policies, grant only the permissions required to perform a task. You do this by defining the actions that can be taken on specific resources under specific conditions, also known as least-privilege permissions. For more information about using IAM to apply permissions, see Policies and permissions in IAM in the IAM User Guide. • Use conditions in IAM policies to further restrict access – You can add a condition to your policies to limit access to actions and resources. For example, you can write a policy condition to specify that all requests must be sent using SSL. You can also use conditions to grant access to service actions if they are used through a specific AWS service, such as AWS CloudFormation. For more information, see IAM JSON policy elements: Condition in the IAM User Guide. • Use IAM Access Analyzer to validate your IAM policies to ensure secure and functional permissions – IAM Access Analyzer validates new and existing policies so that the policies adhere to the IAM policy language (JSON) and IAM best practices. IAM Access Analyzer provides more than 100 policy checks and actionable recommendations to help you author secure and functional policies. For more information, see Validate policies with IAM Access Analyzer in the IAM User Guide. • Require multi-factor authentication (MFA) – If you have a scenario that requires IAM users or a root user in your AWS account, turn on MFA for additional security. To require MFA when API Identity-based policy examples 42 Amazon Managed Blockchain Query Developer Guide operations are called, add MFA conditions to your policies. For more information, see Secure API access with MFA in the IAM User Guide. For more information about best practices in IAM, see Security best practices in IAM in the IAM User Guide. Allow users to view their own permissions This example shows how you might create a policy that allows IAM users to view the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API. { "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": ["arn:aws:iam::*:user/${aws:username}"] }, { "Sid": "NavigateInConsole", "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", "iam:GetPolicy", "iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } Identity-based policy examples 43 Amazon Managed Blockchain Query Developer Guide ] } Accessing specific Amazon Managed Blockchain (AMB) Query API actions Note In order to access the AMB |
ambq-dg-017 | ambq-dg.pdf | 17 | the inline and managed policies that are attached to their user identity. This policy includes permissions to complete this action on the console or programmatically using the AWS CLI or AWS API. { "Version": "2012-10-17", "Statement": [ { "Sid": "ViewOwnUserInfo", "Effect": "Allow", "Action": [ "iam:GetUserPolicy", "iam:ListGroupsForUser", "iam:ListAttachedUserPolicies", "iam:ListUserPolicies", "iam:GetUser" ], "Resource": ["arn:aws:iam::*:user/${aws:username}"] }, { "Sid": "NavigateInConsole", "Effect": "Allow", "Action": [ "iam:GetGroupPolicy", "iam:GetPolicyVersion", "iam:GetPolicy", "iam:ListAttachedGroupPolicies", "iam:ListGroupPolicies", "iam:ListPolicyVersions", "iam:ListPolicies", "iam:ListUsers" ], "Resource": "*" } Identity-based policy examples 43 Amazon Managed Blockchain Query Developer Guide ] } Accessing specific Amazon Managed Blockchain (AMB) Query API actions Note In order to access the AMB Query to make API calls, you will need user credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) that have the appropriate IAM permissions for AMB Query. Example IAM Policy to access all Amazon Managed Blockchain (AMB) Query APIs This example grants an IAM user in your AWS account access to all AMB Query APIs. { "Version": "2012-10-17", "Statement": [ { "Sid": "AccessAllAMBQueryAPIs", "Effect": "Allow", "Action": [ "managedblockchain-query:*" ], "Resource": "*" } ] } Example IAM Policy to access Amazon Managed Blockchain (AMB) Query ListTransactions and GetTransaction APIs This example grants an IAM user in your AWS account access to the AMB Query ListTransaction and GetTransaction APIs Identity-based policy examples 44 Amazon Managed Blockchain Query Developer Guide Note You can replace or add on the APIs in the example with other APIs to give access to other or more APIs. For a list of AMB Query APIs, see the Amazon Managed Blockchain (AMB) Query API Reference Guide. { "Version": "2012-10-17", "Statement": [ { "Sid": "AccessAMBQueryAPIs", "Effect": "Allow", "Action": [ "managedblockchain-query:ListTransactions", "managedblockchain-query:GetTransaction" ], "Resource": "*" } ] } Troubleshooting Amazon Managed Blockchain (AMB) Query identity and access Use the following information to help you diagnose and fix common issues that you might encounter when working with AMB Query and IAM. Topics • I am not authorized to perform an action in AMB Query I am not authorized to perform an action in AMB Query If you receive an error that you're not authorized to perform an action, your policies must be updated to allow you to perform the action. Troubleshooting 45 Amazon Managed Blockchain Query Developer Guide The following example error occurs when the mateojackson IAM user tries to use the console to view details about a fictional my-example-widget resource but doesn't have the fictional managedblockchain-query::GetWidget permissions. User: arn:aws:iam::123456789012:user/mateojackson is not authorized to perform: managedblockchain-query::GetWidget on resource: my-example-widget In this case, the policy for the mateojackson user must be updated to allow access to the my- example-widget resource by using the managedblockchain-query::GetWidget action. If you need help, contact your AWS administrator. Your administrator is the person who provided you with your sign-in credentials. Troubleshooting 46 Amazon Managed Blockchain Query Developer Guide Amazon Managed Blockchain (AMB) Query API usage metrics on Amazon CloudWatch API usage metrics on Amazon CloudWatch The API usage metrics published to CloudWatch correspond to the Amazon Managed Blockchain (AMB) Query service quotas. You can configure alarms to alert you when your usage approaches a service quota. For more information about CloudWatch integration with service quotas, see AWS usage metrics in the Amazon CloudWatch User Guide. AMB Query publishes the following API metrics in the AWS/Usage namespace, with the Amazon Managed Blockchain Query service name. Metric CallCount Description The total number of calls made to an API in AMB Query. SUM represents the total number of calls to the API during the specified period. Amazon Managed Blockchain (AMB) Query publishes usage metrics to the AWS/Usage namespace with the following dimensions. Dimension Service Type Resource Description The name of the AWS service containing the resource. Amazon Managed Blockchai n Query will always be the value for this dimension. The type of the entity being reported. API will always be the value for this dimension. The type of resources being reported. The name of the AMB Query API operation used will be the value for this dimension. API usage metrics on Amazon CloudWatch 47 Amazon Managed Blockchain Query Developer Guide Dimension Class Description The class of the resource being reported. None will always be the value for this dimension. API usage metrics on Amazon CloudWatch 48 Amazon Managed Blockchain Query Developer Guide Document history for the AMB Query User Guide The following table describes the documentation releases for AMB Query. Change Description Date AMB Query supports Bitcoin transaction identifiers and For Bitcoin networks, AMB Query API operations support March 21, 2024 transaction hashes both the transaction identifie r (transactionId ) and the transaction hash (transacti onHash ). Support for API usage metrics on Amazon CloudWatch AMB Query added support for API usage metrics on February 8, 2024 CloudWatch. These usage metrics correspond to the AMB Query service quotas. Support for transactions that have not reached finality AMB Query added support for transactions that have February 1, |
ambq-dg-018 | ambq-dg.pdf | 18 | AMB Query User Guide The following table describes the documentation releases for AMB Query. Change Description Date AMB Query supports Bitcoin transaction identifiers and For Bitcoin networks, AMB Query API operations support March 21, 2024 transaction hashes both the transaction identifie r (transactionId ) and the transaction hash (transacti onHash ). Support for API usage metrics on Amazon CloudWatch AMB Query added support for API usage metrics on February 8, 2024 CloudWatch. These usage metrics correspond to the AMB Query service quotas. Support for transactions that have not reached finality AMB Query added support for transactions that have February 1, 2024 not reached finality. It also removes support for the status property from the response of the GetTransaction operation . Instead, you will use the confirmationStatus and executionStatus properties to determine the status of the transaction. Deprecation of the status property in the Transaction Amazon Managed Blockchai n (AMB) Query has deprecate December 20, 2023 data type d the status property in the Transaction data type. You must use the 49 Amazon Managed Blockchain Query Developer Guide Support for Sepolia Testnet Support for asset contracts confirmationStatus and executionStatus fields to determine if the status of the transaction is FINAL or FAILED. Amazon Managed Blockchai n (AMB) Query now supports queries on the Ethereum Sepolia Testnet. You can use the ListAsset Contracts API operation to list deployed by a given address. Additionally, if you have the contract address, you can use the GetAssetC ontract API operation to retrieve the contract's details. October 19, 2023 October 16, 2023 Support for Bitcoin Testnet Amazon Managed Blockchai n (AMB) Query now supports queries on the Bitcoin Testnet. October 16, 2023 Initial release Initial release of the AMB Query service. July 27, 2023 50 |
amg-api-001 | amg-api.pdf | 1 | API Reference Amazon Managed Grafana API Version 2020-08-18 Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon Managed Grafana API Reference Amazon Managed Grafana: API Reference Copyright © 2025 Amazon Web Services, Inc. and/or its affiliates. All rights reserved. Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon. Amazon Managed Grafana Table of Contents API Reference Welcome ........................................................................................................................................... 1 Actions .............................................................................................................................................. 2 AssociateLicense ............................................................................................................................................ 3 Request Syntax ........................................................................................................................................ 3 URI Request Parameters ........................................................................................................................ 3 Request Body ........................................................................................................................................... 4 Response Syntax ...................................................................................................................................... 4 Response Elements ................................................................................................................................. 5 Errors .......................................................................................................................................................... 5 See Also ..................................................................................................................................................... 6 CreateWorkspace .......................................................................................................................................... 7 Request Syntax ........................................................................................................................................ 7 URI Request Parameters ........................................................................................................................ 8 Request Body ........................................................................................................................................... 8 Response Syntax ................................................................................................................................... 13 Response Elements ............................................................................................................................... 14 Errors ....................................................................................................................................................... 14 See Also .................................................................................................................................................. 15 CreateWorkspaceApiKey ............................................................................................................................ 16 Request Syntax ...................................................................................................................................... 16 URI Request Parameters ...................................................................................................................... 16 Request Body ......................................................................................................................................... 16 Response Syntax ................................................................................................................................... 17 Response Elements ............................................................................................................................... 17 Errors ....................................................................................................................................................... 18 See Also .................................................................................................................................................. 19 CreateWorkspaceServiceAccount ............................................................................................................. 20 Request Syntax ...................................................................................................................................... 20 URI Request Parameters ...................................................................................................................... 20 Request Body ......................................................................................................................................... 21 Response Syntax ................................................................................................................................... 21 Response Elements ............................................................................................................................... 22 Errors ....................................................................................................................................................... 22 See Also .................................................................................................................................................. 23 API Version 2020-08-18 iii Amazon Managed Grafana API Reference CreateWorkspaceServiceAccountToken .................................................................................................. 25 Request Syntax ...................................................................................................................................... 25 URI Request Parameters ...................................................................................................................... 25 Request Body ......................................................................................................................................... 26 Response Syntax ................................................................................................................................... 26 Response Elements ............................................................................................................................... 27 Errors ....................................................................................................................................................... 27 See Also .................................................................................................................................................. 28 DeleteWorkspace ........................................................................................................................................ 30 Request Syntax ...................................................................................................................................... 30 URI Request Parameters ...................................................................................................................... 30 Request Body ......................................................................................................................................... 30 Response Syntax ................................................................................................................................... 30 Response Elements ............................................................................................................................... 31 Errors ....................................................................................................................................................... 32 See Also .................................................................................................................................................. 32 DeleteWorkspaceApiKey ............................................................................................................................ 34 Request Syntax ...................................................................................................................................... 34 URI Request Parameters ...................................................................................................................... 34 Request Body ......................................................................................................................................... 34 Response Syntax ................................................................................................................................... 34 Response Elements ............................................................................................................................... 35 Errors ....................................................................................................................................................... 35 See Also .................................................................................................................................................. 36 DeleteWorkspaceServiceAccount ............................................................................................................ 37 Request Syntax ...................................................................................................................................... 37 URI Request Parameters ...................................................................................................................... 37 Request Body ......................................................................................................................................... 37 Response Syntax ................................................................................................................................... 37 Response Elements ............................................................................................................................... 38 Errors ....................................................................................................................................................... 38 See Also .................................................................................................................................................. 39 DeleteWorkspaceServiceAccountToken .................................................................................................. 40 Request Syntax ...................................................................................................................................... 40 URI Request Parameters ...................................................................................................................... 40 Request Body ......................................................................................................................................... 40 API Version 2020-08-18 iv Amazon Managed Grafana API Reference Response Syntax ................................................................................................................................... 41 Response Elements ............................................................................................................................... 41 Errors ....................................................................................................................................................... 41 See Also .................................................................................................................................................. 42 DescribeWorkspace .................................................................................................................................... 44 Request Syntax ...................................................................................................................................... 44 URI Request Parameters ...................................................................................................................... 44 Request Body ......................................................................................................................................... 44 Response Syntax ................................................................................................................................... 44 Response Elements ............................................................................................................................... 45 Errors ....................................................................................................................................................... 46 See Also .................................................................................................................................................. 46 DescribeWorkspaceAuthentication ......................................................................................................... 48 Request Syntax ...................................................................................................................................... 48 URI Request Parameters ...................................................................................................................... 48 Request Body ......................................................................................................................................... 48 Response Syntax ................................................................................................................................... 48 Response Elements ............................................................................................................................... 49 Errors ....................................................................................................................................................... 49 See Also .................................................................................................................................................. 50 DescribeWorkspaceConfiguration ........................................................................................................... 52 Request Syntax ...................................................................................................................................... 52 URI Request Parameters ...................................................................................................................... 52 Request Body ......................................................................................................................................... 52 Response Syntax ................................................................................................................................... 52 Response Elements ............................................................................................................................... 52 Errors ....................................................................................................................................................... 53 See Also .................................................................................................................................................. 54 DisassociateLicense .................................................................................................................................... 55 Request Syntax ...................................................................................................................................... 55 URI Request Parameters ...................................................................................................................... 55 Request Body ......................................................................................................................................... 55 Response Syntax ................................................................................................................................... 55 Response Elements ............................................................................................................................... 56 Errors ....................................................................................................................................................... 57 See Also .................................................................................................................................................. 57 API Version 2020-08-18 v Amazon Managed Grafana API Reference ListPermissions ............................................................................................................................................ 59 Request Syntax ...................................................................................................................................... 59 URI Request Parameters ...................................................................................................................... 59 Request Body ......................................................................................................................................... 60 Response Syntax ................................................................................................................................... 60 Response Elements ............................................................................................................................... 60 Errors ....................................................................................................................................................... 61 See Also .................................................................................................................................................. 62 ListTagsForResource ................................................................................................................................... 63 Request Syntax ...................................................................................................................................... 63 URI Request Parameters ...................................................................................................................... 63 Request Body ......................................................................................................................................... 63 Response Syntax ................................................................................................................................... 63 Response Elements ............................................................................................................................... 63 Errors ....................................................................................................................................................... 64 See Also .................................................................................................................................................. 65 ListVersions .................................................................................................................................................. 66 Request Syntax ...................................................................................................................................... 66 URI Request Parameters ...................................................................................................................... 66 Request Body ......................................................................................................................................... 66 Response Syntax ................................................................................................................................... 66 Response Elements ............................................................................................................................... 67 Errors ....................................................................................................................................................... 67 See Also .................................................................................................................................................. 68 ListWorkspaces ............................................................................................................................................ 69 Request Syntax ...................................................................................................................................... 69 URI Request Parameters ...................................................................................................................... 69 Request Body ......................................................................................................................................... 69 Response Syntax ................................................................................................................................... 69 Response Elements ............................................................................................................................... 70 Errors ....................................................................................................................................................... 70 See Also .................................................................................................................................................. 71 ListWorkspaceServiceAccounts ................................................................................................................ 72 Request Syntax ...................................................................................................................................... 72 URI Request Parameters ...................................................................................................................... 72 Request Body ......................................................................................................................................... 72 API Version 2020-08-18 vi Amazon Managed Grafana API Reference Response Syntax ................................................................................................................................... 72 Response Elements ............................................................................................................................... 73 Errors ....................................................................................................................................................... 73 See Also .................................................................................................................................................. 74 ListWorkspaceServiceAccountTokens ..................................................................................................... 76 Request Syntax ...................................................................................................................................... 76 URI Request Parameters ...................................................................................................................... 76 Request Body ......................................................................................................................................... 77 Response Syntax ................................................................................................................................... 77 Response Elements ............................................................................................................................... 77 Errors ....................................................................................................................................................... 78 See Also .................................................................................................................................................. 79 TagResource ................................................................................................................................................. 80 Request Syntax ...................................................................................................................................... 80 URI Request Parameters ...................................................................................................................... 80 Request Body ......................................................................................................................................... 80 Response Syntax ................................................................................................................................... 81 Response Elements ............................................................................................................................... 81 Errors ....................................................................................................................................................... 81 See Also .................................................................................................................................................. 82 UntagResource ............................................................................................................................................ 83 Request Syntax ...................................................................................................................................... 83 URI Request Parameters ...................................................................................................................... 83 Request Body ......................................................................................................................................... 83 Response Syntax |
amg-api-002 | amg-api.pdf | 2 | Amazon Managed Grafana API Reference Response Syntax ................................................................................................................................... 72 Response Elements ............................................................................................................................... 73 Errors ....................................................................................................................................................... 73 See Also .................................................................................................................................................. 74 ListWorkspaceServiceAccountTokens ..................................................................................................... 76 Request Syntax ...................................................................................................................................... 76 URI Request Parameters ...................................................................................................................... 76 Request Body ......................................................................................................................................... 77 Response Syntax ................................................................................................................................... 77 Response Elements ............................................................................................................................... 77 Errors ....................................................................................................................................................... 78 See Also .................................................................................................................................................. 79 TagResource ................................................................................................................................................. 80 Request Syntax ...................................................................................................................................... 80 URI Request Parameters ...................................................................................................................... 80 Request Body ......................................................................................................................................... 80 Response Syntax ................................................................................................................................... 81 Response Elements ............................................................................................................................... 81 Errors ....................................................................................................................................................... 81 See Also .................................................................................................................................................. 82 UntagResource ............................................................................................................................................ 83 Request Syntax ...................................................................................................................................... 83 URI Request Parameters ...................................................................................................................... 83 Request Body ......................................................................................................................................... 83 Response Syntax ................................................................................................................................... 83 Response Elements ............................................................................................................................... 83 Errors ....................................................................................................................................................... 84 See Also .................................................................................................................................................. 84 UpdatePermissions ..................................................................................................................................... 86 Request Syntax ...................................................................................................................................... 86 URI Request Parameters ...................................................................................................................... 86 Request Body ......................................................................................................................................... 86 Response Syntax ................................................................................................................................... 87 Response Elements ............................................................................................................................... 87 Errors ....................................................................................................................................................... 88 See Also .................................................................................................................................................. 88 API Version 2020-08-18 vii Amazon Managed Grafana API Reference UpdateWorkspace ....................................................................................................................................... 90 Request Syntax ...................................................................................................................................... 90 URI Request Parameters ...................................................................................................................... 90 Request Body ......................................................................................................................................... 91 Response Syntax ................................................................................................................................... 95 Response Elements ............................................................................................................................... 96 Errors ....................................................................................................................................................... 96 See Also .................................................................................................................................................. 97 UpdateWorkspaceAuthentication ............................................................................................................ 98 Request Syntax ...................................................................................................................................... 98 URI Request Parameters ...................................................................................................................... 99 Request Body ......................................................................................................................................... 99 Response Syntax ................................................................................................................................... 99 Response Elements ............................................................................................................................ 100 Errors ..................................................................................................................................................... 101 See Also ................................................................................................................................................ 101 UpdateWorkspaceConfiguration ........................................................................................................... 103 Request Syntax .................................................................................................................................... 103 URI Request Parameters ................................................................................................................... 103 Request Body ....................................................................................................................................... 103 Response Syntax ................................................................................................................................. 104 Response Elements ............................................................................................................................ 104 Errors ..................................................................................................................................................... 104 See Also ................................................................................................................................................ 105 Data Types ................................................................................................................................... 106 AssertionAttributes .................................................................................................................................. 108 Contents ............................................................................................................................................... 108 See Also ................................................................................................................................................ 109 AuthenticationDescription ...................................................................................................................... 110 Contents ............................................................................................................................................... 110 See Also ................................................................................................................................................ 110 AuthenticationSummary ......................................................................................................................... 112 Contents ............................................................................................................................................... 112 See Also ................................................................................................................................................ 112 AwsSsoAuthentication ............................................................................................................................. 113 Contents ............................................................................................................................................... 113 API Version 2020-08-18 viii Amazon Managed Grafana API Reference See Also ................................................................................................................................................ 113 IdpMetadata .............................................................................................................................................. 114 Contents ............................................................................................................................................... 114 See Also ................................................................................................................................................ 114 NetworkAccessConfiguration ................................................................................................................. 116 Contents ............................................................................................................................................... 116 See Also ................................................................................................................................................ 117 PermissionEntry ........................................................................................................................................ 118 Contents ............................................................................................................................................... 118 See Also ................................................................................................................................................ 118 RoleValues ................................................................................................................................................. 119 Contents ............................................................................................................................................... 119 See Also ................................................................................................................................................ 119 SamlAuthentication ................................................................................................................................. 120 Contents ............................................................................................................................................... 120 See Also ................................................................................................................................................ 120 SamlConfiguration ................................................................................................................................... 121 Contents ............................................................................................................................................... 121 See Also ................................................................................................................................................ 122 ServiceAccountSummary ........................................................................................................................ 123 Contents ............................................................................................................................................... 123 See Also ................................................................................................................................................ 123 ServiceAccountTokenSummary ............................................................................................................. 125 Contents ............................................................................................................................................... 125 See Also ................................................................................................................................................ 126 ServiceAccountTokenSummaryWithKey .............................................................................................. 127 Contents ............................................................................................................................................... 127 See Also ................................................................................................................................................ 127 UpdateError ............................................................................................................................................... 129 Contents ............................................................................................................................................... 129 See Also ................................................................................................................................................ 129 UpdateInstruction .................................................................................................................................... 131 Contents ............................................................................................................................................... 131 See Also ................................................................................................................................................ 131 User ............................................................................................................................................................. 133 Contents ............................................................................................................................................... 133 API Version 2020-08-18 ix Amazon Managed Grafana API Reference See Also ................................................................................................................................................ 133 ValidationExceptionField ........................................................................................................................ 134 Contents ............................................................................................................................................... 134 See Also ................................................................................................................................................ 134 VpcConfiguration ..................................................................................................................................... 135 Contents ............................................................................................................................................... 135 See Also ................................................................................................................................................ 136 WorkspaceDescription ............................................................................................................................. 137 Contents ............................................................................................................................................... 137 See Also ................................................................................................................................................ 143 WorkspaceSummary ................................................................................................................................ 144 Contents ............................................................................................................................................... 144 See Also ................................................................................................................................................ 147 Common Parameters ................................................................................................................... 148 Common Errors ............................................................................................................................ 151 API Version 2020-08-18 x Amazon Managed Grafana Welcome API Reference Amazon Managed Grafana is a fully managed and secure data visualization service that you can use to instantly query, correlate, and visualize operational metrics, logs, and traces from multiple sources. Amazon Managed Grafana makes it easy to deploy, operate, and scale Grafana, a widely deployed data visualization tool that is popular for its extensible data support. With Amazon Managed Grafana, you create logically isolated Grafana servers called workspaces. In a workspace, you can create Grafana dashboards and visualizations to analyze your metrics, logs, and traces without having to build, package, or deploy any hardware to run Grafana servers. This document was last published on May 14, 2025. API Version 2020-08-18 1 Amazon Managed Grafana Actions The following actions are supported: • AssociateLicense • CreateWorkspace • CreateWorkspaceApiKey • CreateWorkspaceServiceAccount • CreateWorkspaceServiceAccountToken • DeleteWorkspace • DeleteWorkspaceApiKey • DeleteWorkspaceServiceAccount • DeleteWorkspaceServiceAccountToken • DescribeWorkspace • DescribeWorkspaceAuthentication • DescribeWorkspaceConfiguration • DisassociateLicense • ListPermissions • ListTagsForResource • ListVersions • ListWorkspaces • ListWorkspaceServiceAccounts • ListWorkspaceServiceAccountTokens • TagResource • UntagResource • UpdatePermissions • UpdateWorkspace • UpdateWorkspaceAuthentication • UpdateWorkspaceConfiguration API Reference API Version 2020-08-18 2 Amazon Managed Grafana AssociateLicense API Reference Assigns a Grafana Enterprise license to a workspace. To upgrade, you must use ENTERPRISE for the licenseType, and pass in a valid Grafana Labs token for the grafanaToken. Upgrading to Grafana Enterprise incurs additional fees. For more information, see Upgrade a workspace to Grafana Enterprise. Request Syntax POST /workspaces/workspaceId/licenses/licenseType HTTP/1.1 Grafana-Token: grafanaToken URI Request Parameters The request uses the following URI parameters. grafanaToken A token from Grafana Labs that ties your AWS account with a Grafana Labs account. For more information, see Link your account with Grafana Labs. Length Constraints: Minimum length of 1. Maximum length of 36. licenseType The type of license to associate with the workspace. Note Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials. Valid Values: ENTERPRISE | ENTERPRISE_FREE_TRIAL Required: Yes workspaceId The ID of the |
amg-api-003 | amg-api.pdf | 3 | incurs additional fees. For more information, see Upgrade a workspace to Grafana Enterprise. Request Syntax POST /workspaces/workspaceId/licenses/licenseType HTTP/1.1 Grafana-Token: grafanaToken URI Request Parameters The request uses the following URI parameters. grafanaToken A token from Grafana Labs that ties your AWS account with a Grafana Labs account. For more information, see Link your account with Grafana Labs. Length Constraints: Minimum length of 1. Maximum length of 36. licenseType The type of license to associate with the workspace. Note Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials. Valid Values: ENTERPRISE | ENTERPRISE_FREE_TRIAL Required: Yes workspaceId The ID of the workspace to associate the license with. Pattern: ^g-[0-9a-f]{10}$ AssociateLicense API Version 2020-08-18 3 API Reference Amazon Managed Grafana Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 202 Content-type: application/json { "workspace": { "accountAccessType": "string", "authentication": { "providers": [ "string" ], "samlConfigurationStatus": "string" }, "created": number, "dataSources": [ "string" ], "description": "string", "endpoint": "string", "freeTrialConsumed": boolean, "freeTrialExpiration": number, "grafanaToken": "string", "grafanaVersion": "string", "id": "string", "licenseExpiration": number, "licenseType": "string", "modified": number, "name": "string", "networkAccessControl": { "prefixListIds": [ "string" ], "vpceIds": [ "string" ] }, "notificationDestinations": [ "string" ], "organizationalUnits": [ "string" ], "organizationRoleName": "string", "permissionType": "string", "stackSetName": "string", "status": "string", "tags": { Request Body API Version 2020-08-18 4 Amazon Managed Grafana API Reference "string" : "string" }, "vpcConfiguration": { "securityGroupIds": [ "string" ], "subnetIds": [ "string" ] }, "workspaceRoleArn": "string" } } Response Elements If the action is successful, the service sends back an HTTP 202 response. The following data is returned in JSON format by the service. workspace A structure containing data about the workspace. Type: WorkspaceDescription object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 Response Elements API Version 2020-08-18 5 Amazon Managed Grafana ThrottlingException API Reference The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 6 Amazon Managed Grafana CreateWorkspace API Reference Creates a workspace. In a workspace, you can create Grafana dashboards and visualizations to analyze your metrics, logs, and traces. You don't have to build, package, or deploy any hardware to run the Grafana server. Don't use CreateWorkspace to modify an existing workspace. Instead, use UpdateWorkspace. Request Syntax POST /workspaces HTTP/1.1 Content-type: application/json { "accountAccessType": "string", "authenticationProviders": [ "string" ], "clientToken": "string", "configuration": "string", "grafanaVersion": "string", "networkAccessControl": { "prefixListIds": [ "string" ], "vpceIds": [ "string" ] }, "organizationRoleName": "string", "permissionType": "string", "stackSetName": "string", "tags": { "string" : "string" }, "vpcConfiguration": { "securityGroupIds": [ "string" ], "subnetIds": [ "string" ] }, "workspaceDataSources": [ "string" ], "workspaceDescription": "string", "workspaceName": "string", "workspaceNotificationDestinations": [ "string" ], "workspaceOrganizationalUnits": [ "string" ], "workspaceRoleArn": "string" } CreateWorkspace API Version 2020-08-18 7 Amazon Managed Grafana API Reference URI Request Parameters The request does not use any URI parameters. Request Body The request accepts the following data in JSON format. accountAccessType Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization. If you specify ORGANIZATION, you must specify which organizational units the workspace can access in the workspaceOrganizationalUnits parameter. Type: String Valid Values: CURRENT_ACCOUNT | ORGANIZATION Required: Yes authenticationProviders Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace. For more information, see User authentication in Amazon Managed Grafana. Type: Array of strings Valid Values: AWS_SSO | SAML Required: Yes clientToken A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. Type: String Pattern: ^[!-~]{1,64}$ Required: No URI Request Parameters API Version 2020-08-18 8 Amazon Managed Grafana configuration API Reference The configuration string for the workspace that you create. For more information about the format and configuration options available, see Working in your Grafana workspace. Type: String Length Constraints: Minimum length of 2. Maximum length of 65536. Required: No grafanaVersion Specifies the version of Grafana to support in the new workspace. If not specified, |
amg-api-004 | amg-api.pdf | 4 | Amazon Managed Grafana. Type: Array of strings Valid Values: AWS_SSO | SAML Required: Yes clientToken A unique, case-sensitive, user-provided identifier to ensure the idempotency of the request. Type: String Pattern: ^[!-~]{1,64}$ Required: No URI Request Parameters API Version 2020-08-18 8 Amazon Managed Grafana configuration API Reference The configuration string for the workspace that you create. For more information about the format and configuration options available, see Working in your Grafana workspace. Type: String Length Constraints: Minimum length of 2. Maximum length of 65536. Required: No grafanaVersion Specifies the version of Grafana to support in the new workspace. If not specified, defaults to the latest version (for example, 10.4). To get a list of supported versions, use the ListVersions operation. Type: String Length Constraints: Minimum length of 1. Maximum length of 255. Required: No networkAccessControl Configuration for network access to your workspace. When this is configured, only listed IP addresses and VPC endpoints will be able to access your workspace. Standard Grafana authentication and authorization will still be required. If this is not configured, or is removed, then all IP addresses and VPC endpoints will be allowed. Standard Grafana authentication and authorization will still be required. Type: NetworkAccessConfiguration object Required: No organizationRoleName The name of an IAM role that already exists to use with Organizations to access AWS data sources and notification channels in other accounts in an organization. Request Body API Version 2020-08-18 9 Amazon Managed Grafana Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 2048. Required: No permissionType When creating a workspace through the AWS API, CLI or AWS CloudFormation, you must manage IAM roles and provision the permissions that the workspace needs to use AWS data sources and notification channels. You must also specify a workspaceRoleArn for a role that you will manage for the workspace to use when accessing those datasources and notification channels. The ability for Amazon Managed Grafana to create and update IAM roles on behalf of the user is supported only in the Amazon Managed Grafana console, where this value may be set to SERVICE_MANAGED. Note Use only the CUSTOMER_MANAGED permission type when creating a workspace with the API, CLI or AWS CloudFormation. For more information, see Amazon Managed Grafana permissions and policies for AWS data sources and notification channels. Type: String Valid Values: CUSTOMER_MANAGED | SERVICE_MANAGED Required: Yes stackSetName The name of the AWS CloudFormation stack set to use to generate IAM roles to be used for this workspace. Type: String Required: No Request Body API Version 2020-08-18 10 API Reference Amazon Managed Grafana tags The list of tags associated with the workspace. 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 vpcConfiguration The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. Note Connecting to a private VPC is not yet available in the Asia Pacific (Seoul) Region (ap- northeast-2). Type: VpcConfiguration object Required: No workspaceDataSources This parameter is for internal use only, and should not be used. Type: Array of strings Valid Values: AMAZON_OPENSEARCH_SERVICE | CLOUDWATCH | PROMETHEUS | XRAY | TIMESTREAM | SITEWISE | ATHENA | REDSHIFT | TWINMAKER Required: No workspaceDescription A description for the workspace. This is used only to help you identify this workspace. Request Body API Version 2020-08-18 11 Amazon Managed Grafana API Reference Pattern: ^[\\p{L}\\p{Z}\\p{N}\\p{P}]{0,2048}$ Type: String Length Constraints: Minimum length of 0. Maximum length of 2048. Required: No workspaceName The name for the workspace. It does not have to be unique. Type: String Pattern: ^[a-zA-Z0-9-._~]{1,255}$ Required: No workspaceNotificationDestinations Specify the AWS notification channels that you plan to use in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to use these channels. Type: Array of strings Valid Values: SNS Required: No workspaceOrganizationalUnits Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization. Type: Array of strings Required: No workspaceRoleArn Specified the IAM role that grants permissions to the AWS resources that the workspace will view data from, including both data sources and notification channels. You are responsible for managing the permissions for this role as new data sources or notification channels are added. Request Body API Version 2020-08-18 12 Amazon Managed Grafana Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 2048. Required: No Response Syntax HTTP/1.1 202 Content-type: application/json { "workspace": { "accountAccessType": "string", "authentication": { "providers": [ "string" ], "samlConfigurationStatus": "string" }, "created": number, "dataSources": [ "string" ], "description": "string", "endpoint": "string", "freeTrialConsumed": |
amg-api-005 | amg-api.pdf | 5 | Specified the IAM role that grants permissions to the AWS resources that the workspace will view data from, including both data sources and notification channels. You are responsible for managing the permissions for this role as new data sources or notification channels are added. Request Body API Version 2020-08-18 12 Amazon Managed Grafana Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 2048. Required: No Response Syntax HTTP/1.1 202 Content-type: application/json { "workspace": { "accountAccessType": "string", "authentication": { "providers": [ "string" ], "samlConfigurationStatus": "string" }, "created": number, "dataSources": [ "string" ], "description": "string", "endpoint": "string", "freeTrialConsumed": boolean, "freeTrialExpiration": number, "grafanaToken": "string", "grafanaVersion": "string", "id": "string", "licenseExpiration": number, "licenseType": "string", "modified": number, "name": "string", "networkAccessControl": { "prefixListIds": [ "string" ], "vpceIds": [ "string" ] }, "notificationDestinations": [ "string" ], "organizationalUnits": [ "string" ], "organizationRoleName": "string", "permissionType": "string", "stackSetName": "string", "status": "string", "tags": { "string" : "string" Response Syntax API Version 2020-08-18 13 API Reference Amazon Managed Grafana }, "vpcConfiguration": { "securityGroupIds": [ "string" ], "subnetIds": [ "string" ] }, "workspaceRoleArn": "string" } } Response Elements If the action is successful, the service sends back an HTTP 202 response. The following data is returned in JSON format by the service. workspace A structure containing data about the workspace that was created. Type: WorkspaceDescription object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 Response Elements API Version 2020-08-18 14 Amazon Managed Grafana API Reference ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 15 Amazon Managed Grafana API Reference CreateWorkspaceApiKey Creates a Grafana API key for the workspace. This key can be used to authenticate requests sent to the workspace's HTTP API. See https://docs.aws.amazon.com/grafana/latest/userguide/Using- Grafana-APIs.html for available APIs and example requests. Note In workspaces compatible with Grafana version 9 or above, use workspace service accounts instead of API keys. API keys will be removed in a future release. Request Syntax POST /workspaces/workspaceId/apikeys HTTP/1.1 Content-type: application/json { "keyName": "string", "keyRole": "string", "secondsToLive": number } URI Request Parameters The request uses the following URI parameters. workspaceId The ID of the workspace to create an API key. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request accepts the following data in JSON format. CreateWorkspaceApiKey API Version 2020-08-18 16 Amazon Managed Grafana keyName API Reference Specifies the name of the key. Keynames must be unique to the workspace. Type: String Length Constraints: Minimum length of 1. Maximum length of 100. Required: Yes keyRole Specifies the permission level of the key. Valid values: ADMIN|EDITOR|VIEWER Type: String Required: Yes secondsToLive Specifies the time in seconds until the key expires. Keys can be valid for up to 30 days. Type: Integer Valid Range: Minimum value of 1. Maximum value of 2592000. Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "key": "string", "keyName": "string", "workspaceId": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. Response Syntax API Version 2020-08-18 17 Amazon Managed Grafana API Reference The following data is returned in JSON format by the service. key The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace. Type: String keyName The name of the key that was created. Type: String Length Constraints: Minimum length of 1. Maximum length of 100. workspaceId The ID of the workspace that the key is valid for. Type: String Pattern: ^g-[0-9a-f]{10}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 Errors API Version 2020-08-18 18 API Reference Amazon Managed Grafana ResourceNotFoundException The request |
amg-api-006 | amg-api.pdf | 6 | Constraints: Minimum length of 1. Maximum length of 100. workspaceId The ID of the workspace that the key is valid for. Type: String Pattern: ^g-[0-9a-f]{10}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 Errors API Version 2020-08-18 18 API Reference Amazon Managed Grafana ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 19 Amazon Managed Grafana API Reference CreateWorkspaceServiceAccount Creates a service account for the workspace. A service account can be used to call Grafana HTTP APIs, and run automated workloads. After creating the service account with the correct GrafanaRole for your use case, use CreateWorkspaceServiceAccountToken to create a token that can be used to authenticate and authorize Grafana HTTP API calls. You can only create service accounts for workspaces that are compatible with Grafana version 9 and above. Note For more information about service accounts, see Service accounts in the Amazon Managed Grafana User Guide. For more information about the Grafana HTTP APIs, see Using Grafana HTTP APIs in the Amazon Managed Grafana User Guide. Request Syntax POST /workspaces/workspaceId/serviceaccounts HTTP/1.1 Content-type: application/json { "grafanaRole": "string", "name": "string" } URI Request Parameters The request uses the following URI parameters. workspaceId The ID of the workspace within which to create the service account. Pattern: ^g-[0-9a-f]{10}$ Required: Yes CreateWorkspaceServiceAccount API Version 2020-08-18 20 Amazon Managed Grafana Request Body The request accepts the following data in JSON format. grafanaRole The permission level to use for this service account. API Reference Note For more information about the roles and the permissions each has, see User roles in the Amazon Managed Grafana User Guide. Type: String Valid Values: ADMIN | EDITOR | VIEWER Required: Yes name A name for the service account. The name must be unique within the workspace, as it determines the ID associated with the service account. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "grafanaRole": "string", "id": "string", "name": "string", "workspaceId": "string" Request Body API Version 2020-08-18 21 Amazon Managed Grafana } 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. API Reference grafanaRole The permission level given to the service account. Type: String Valid Values: ADMIN | EDITOR | VIEWER id The ID of the service account. Type: String name The name of the service account. Type: String workspaceId The workspace with which the service account is associated. Type: String Pattern: ^g-[0-9a-f]{10}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. Response Elements API Version 2020-08-18 22 API Reference Amazon Managed Grafana HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 See Also API Version 2020-08-18 23 API Reference Amazon Managed Grafana • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • |
amg-api-007 | amg-api.pdf | 7 | The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 See Also API Version 2020-08-18 23 API Reference Amazon Managed Grafana • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 24 Amazon Managed Grafana API Reference CreateWorkspaceServiceAccountToken Creates a token that can be used to authenticate and authorize Grafana HTTP API operations for the given workspace service account. The service account acts as a user for the API operations, and defines the permissions that are used by the API. Important When you create the service account token, you will receive a key that is used when calling Grafana APIs. Do not lose this key, as it will not be retrievable again. If you do lose the key, you can delete the token and recreate it to receive a new key. This will disable the initial key. Service accounts are only available for workspaces that are compatible with Grafana version 9 and above. Request Syntax POST /workspaces/workspaceId/serviceaccounts/serviceAccountId/tokens HTTP/1.1 Content-type: application/json { "name": "string", "secondsToLive": number } URI Request Parameters The request uses the following URI parameters. serviceAccountId The ID of the service account for which to create a token. Required: Yes workspaceId The ID of the workspace the service account resides within. CreateWorkspaceServiceAccountToken API Version 2020-08-18 25 Amazon Managed Grafana API Reference Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request accepts the following data in JSON format. name A name for the token to create. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Required: Yes secondsToLive Sets how long the token will be valid, in seconds. You can set the time up to 30 days in the future. Type: Integer Valid Range: Minimum value of 1. Maximum value of 2592000. Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "serviceAccountId": "string", "serviceAccountToken": { "id": "string", "key": "string", "name": "string" }, "workspaceId": "string" Request Body API Version 2020-08-18 26 API Reference Amazon Managed Grafana } 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. serviceAccountId The ID of the service account where the token was created. Type: String serviceAccountToken Information about the created token, including the key. Be sure to store the key securely. Type: ServiceAccountTokenSummaryWithKey object workspaceId The ID of the workspace where the token was created. Type: String Pattern: ^g-[0-9a-f]{10}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 Response Elements API Version 2020-08-18 27 Amazon Managed Grafana InternalServerException API Reference Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ServiceQuotaExceededException The request would cause a service quota to be exceeded. HTTP Status Code: 402 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin See Also API Version 2020-08-18 28 Amazon Managed Grafana • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2020-08-18 29 API Reference Amazon Managed Grafana DeleteWorkspace Deletes an Amazon Managed Grafana workspace. Request Syntax DELETE /workspaces/workspaceId HTTP/1.1 URI Request Parameters The request uses the following URI parameters. workspaceId The ID of the workspace to delete. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 202 Content-type: application/json { "workspace": { "accountAccessType": "string", "authentication": { "providers": [ "string" ], "samlConfigurationStatus": "string" }, "created": number, "dataSources": [ "string" ], "description": "string", DeleteWorkspace API Version 2020-08-18 30 Amazon Managed Grafana API Reference "endpoint": "string", "freeTrialConsumed": boolean, "freeTrialExpiration": number, |
amg-api-008 | amg-api.pdf | 8 | Reference See Also API Version 2020-08-18 29 API Reference Amazon Managed Grafana DeleteWorkspace Deletes an Amazon Managed Grafana workspace. Request Syntax DELETE /workspaces/workspaceId HTTP/1.1 URI Request Parameters The request uses the following URI parameters. workspaceId The ID of the workspace to delete. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 202 Content-type: application/json { "workspace": { "accountAccessType": "string", "authentication": { "providers": [ "string" ], "samlConfigurationStatus": "string" }, "created": number, "dataSources": [ "string" ], "description": "string", DeleteWorkspace API Version 2020-08-18 30 Amazon Managed Grafana API Reference "endpoint": "string", "freeTrialConsumed": boolean, "freeTrialExpiration": number, "grafanaToken": "string", "grafanaVersion": "string", "id": "string", "licenseExpiration": number, "licenseType": "string", "modified": number, "name": "string", "networkAccessControl": { "prefixListIds": [ "string" ], "vpceIds": [ "string" ] }, "notificationDestinations": [ "string" ], "organizationalUnits": [ "string" ], "organizationRoleName": "string", "permissionType": "string", "stackSetName": "string", "status": "string", "tags": { "string" : "string" }, "vpcConfiguration": { "securityGroupIds": [ "string" ], "subnetIds": [ "string" ] }, "workspaceRoleArn": "string" } } Response Elements If the action is successful, the service sends back an HTTP 202 response. The following data is returned in JSON format by the service. workspace A structure containing information about the workspace that was deleted. Type: WorkspaceDescription object Response Elements API Version 2020-08-18 31 Amazon Managed Grafana Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 Errors API Version 2020-08-18 32 API Reference Amazon Managed Grafana • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 33 Amazon Managed Grafana API Reference DeleteWorkspaceApiKey Deletes a Grafana API key for the workspace. Note In workspaces compatible with Grafana version 9 or above, use workspace service accounts instead of API keys. API keys will be removed in a future release. Request Syntax DELETE /workspaces/workspaceId/apikeys/keyName HTTP/1.1 URI Request Parameters The request uses the following URI parameters. keyName The name of the API key to delete. Length Constraints: Minimum length of 1. Maximum length of 100. Required: Yes workspaceId The ID of the workspace to delete. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 DeleteWorkspaceApiKey API Version 2020-08-18 34 Amazon Managed Grafana API Reference Content-type: application/json { "keyName": "string", "workspaceId": "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. keyName The name of the key that was deleted. Type: String Length Constraints: Minimum length of 1. Maximum length of 100. workspaceId The ID of the workspace where the key was deleted. Type: String Pattern: ^g-[0-9a-f]{10}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 Response Elements API Version 2020-08-18 35 Amazon Managed Grafana InternalServerException API Reference Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 36 Amazon Managed Grafana API Reference DeleteWorkspaceServiceAccount Deletes |
amg-api-009 | amg-api.pdf | 9 | of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 36 Amazon Managed Grafana API Reference DeleteWorkspaceServiceAccount Deletes a workspace service account from the workspace. This will delete any tokens created for the service account, as well. If the tokens are currently in use, the will fail to authenticate / authorize after they are deleted. Service accounts are only available for workspaces that are compatible with Grafana version 9 and above. Request Syntax DELETE /workspaces/workspaceId/serviceaccounts/serviceAccountId HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceAccountId The ID of the service account to delete. Required: Yes workspaceId The ID of the workspace where the service account resides. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json DeleteWorkspaceServiceAccount API Version 2020-08-18 37 Amazon Managed Grafana API Reference { "serviceAccountId": "string", "workspaceId": "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. serviceAccountId The ID of the service account deleted. Type: String workspaceId The ID of the workspace where the service account was deleted. Type: String Pattern: ^g-[0-9a-f]{10}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. Response Elements API Version 2020-08-18 38 API Reference Amazon Managed Grafana HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 39 Amazon Managed Grafana API Reference DeleteWorkspaceServiceAccountToken Deletes a token for the workspace service account. This will disable the key associated with the token. If any automation is currently using the key, it will no longer be authenticated or authorized to perform actions with the Grafana HTTP APIs. Service accounts are only available for workspaces that are compatible with Grafana version 9 and above. Request Syntax DELETE /workspaces/workspaceId/serviceaccounts/serviceAccountId/tokens/tokenId HTTP/1.1 URI Request Parameters The request uses the following URI parameters. serviceAccountId The ID of the service account from which to delete the token. Required: Yes tokenId The ID of the token to delete. Required: Yes workspaceId The ID of the workspace from which to delete the token. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. DeleteWorkspaceServiceAccountToken API Version 2020-08-18 40 API Reference Amazon Managed Grafana Response Syntax HTTP/1.1 200 Content-type: application/json { "serviceAccountId": "string", "tokenId": "string", "workspaceId": "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. serviceAccountId The ID of the service account where the token was deleted. Type: String tokenId The ID of the token that was deleted. Type: String workspaceId The ID of the workspace where the token was deleted. Type: String Pattern: ^g-[0-9a-f]{10}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. Response Syntax API Version 2020-08-18 41 Amazon Managed Grafana HTTP Status Code: 403 ConflictException API Reference A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException |
amg-api-010 | amg-api.pdf | 10 | the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. Response Syntax API Version 2020-08-18 41 Amazon Managed Grafana HTTP Status Code: 403 ConflictException API Reference A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 See Also API Version 2020-08-18 42 Amazon Managed Grafana • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2020-08-18 43 Amazon Managed Grafana DescribeWorkspace API Reference Displays information about one Amazon Managed Grafana workspace. Request Syntax GET /workspaces/workspaceId HTTP/1.1 URI Request Parameters The request uses the following URI parameters. workspaceId The ID of the workspace to display information about. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "workspace": { "accountAccessType": "string", "authentication": { "providers": [ "string" ], "samlConfigurationStatus": "string" }, "created": number, "dataSources": [ "string" ], "description": "string", DescribeWorkspace API Version 2020-08-18 44 Amazon Managed Grafana API Reference "endpoint": "string", "freeTrialConsumed": boolean, "freeTrialExpiration": number, "grafanaToken": "string", "grafanaVersion": "string", "id": "string", "licenseExpiration": number, "licenseType": "string", "modified": number, "name": "string", "networkAccessControl": { "prefixListIds": [ "string" ], "vpceIds": [ "string" ] }, "notificationDestinations": [ "string" ], "organizationalUnits": [ "string" ], "organizationRoleName": "string", "permissionType": "string", "stackSetName": "string", "status": "string", "tags": { "string" : "string" }, "vpcConfiguration": { "securityGroupIds": [ "string" ], "subnetIds": [ "string" ] }, "workspaceRoleArn": "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. workspace A structure containing information about the workspace. Type: WorkspaceDescription object Response Elements API Version 2020-08-18 45 Amazon Managed Grafana Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 Errors API Version 2020-08-18 46 Amazon Managed Grafana • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2020-08-18 47 Amazon Managed Grafana API Reference DescribeWorkspaceAuthentication Displays information about the authentication methods used in one Amazon Managed Grafana workspace. Request Syntax GET /workspaces/workspaceId/authentication HTTP/1.1 URI Request Parameters The request uses the following URI parameters. workspaceId The ID of the workspace to return authentication information about. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "authentication": { "awsSso": { "ssoClientId": "string" }, "providers": [ "string" ], "saml": { "configuration": { "allowedOrganizations": [ "string" ], "assertionAttributes": { "email": "string", DescribeWorkspaceAuthentication API Version 2020-08-18 48 Amazon Managed Grafana API Reference "groups": "string", "login": "string", "name": "string", "org": "string", "role": "string" }, "idpMetadata": { ... }, "loginValidityDuration": number, "roleValues": { "admin": [ "string" ], "editor": [ "string" ] } }, "status": "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. authentication A structure containing information about the authentication methods used in the workspace. Type: AuthenticationDescription object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A |
amg-api-011 | amg-api.pdf | 11 | "role": "string" }, "idpMetadata": { ... }, "loginValidityDuration": number, "roleValues": { "admin": [ "string" ], "editor": [ "string" ] } }, "status": "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. authentication A structure containing information about the authentication methods used in the workspace. Type: AuthenticationDescription object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. Response Elements API Version 2020-08-18 49 Amazon Managed Grafana HTTP Status Code: 409 InternalServerException API Reference Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 50 Amazon Managed Grafana API Reference See Also API Version 2020-08-18 51 Amazon Managed Grafana API Reference DescribeWorkspaceConfiguration Gets the current configuration string for the given workspace. Request Syntax GET /workspaces/workspaceId/configuration HTTP/1.1 URI Request Parameters The request uses the following URI parameters. workspaceId The ID of the workspace to get configuration information for. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "configuration": "string", "grafanaVersion": "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. DescribeWorkspaceConfiguration API Version 2020-08-18 52 Amazon Managed Grafana configuration API Reference The configuration string for the workspace that you requested. For more information about the format and configuration options available, see Working in your Grafana workspace. Type: String Length Constraints: Minimum length of 2. Maximum length of 65536. grafanaVersion The supported Grafana version for the workspace. Type: String Length Constraints: Minimum length of 1. Maximum length of 255. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 Errors API Version 2020-08-18 53 Amazon Managed Grafana See Also API Reference 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 54 Amazon Managed Grafana DisassociateLicense API Reference Removes the Grafana Enterprise license from a workspace. Request Syntax DELETE /workspaces/workspaceId/licenses/licenseType HTTP/1.1 URI Request Parameters The request uses the following URI parameters. licenseType The type of license to remove from the workspace. Valid Values: ENTERPRISE | ENTERPRISE_FREE_TRIAL Required: Yes workspaceId The ID of the workspace to remove the Grafana Enterprise license from. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 202 Content-type: application/json { "workspace": { "accountAccessType": "string", DisassociateLicense API Version 2020-08-18 55 Amazon Managed Grafana API Reference "authentication": { "providers": [ "string" ], "samlConfigurationStatus": "string" }, "created": number, "dataSources": [ "string" ], "description": "string", "endpoint": "string", "freeTrialConsumed": boolean, "freeTrialExpiration": number, "grafanaToken": "string", "grafanaVersion": "string", "id": "string", "licenseExpiration": number, "licenseType": "string", "modified": number, "name": "string", "networkAccessControl": { "prefixListIds": [ "string" ], "vpceIds": [ "string" ] }, "notificationDestinations": [ "string" ], "organizationalUnits": [ "string" ], "organizationRoleName": "string", "permissionType": "string", "stackSetName": "string", "status": "string", "tags": { "string" : "string" }, "vpcConfiguration": { "securityGroupIds": [ "string" ], "subnetIds": [ "string" ] }, "workspaceRoleArn": "string" } } Response Elements If the action is successful, the service sends back an HTTP 202 response. The following data |
amg-api-012 | amg-api.pdf | 12 | [ "string" ], "samlConfigurationStatus": "string" }, "created": number, "dataSources": [ "string" ], "description": "string", "endpoint": "string", "freeTrialConsumed": boolean, "freeTrialExpiration": number, "grafanaToken": "string", "grafanaVersion": "string", "id": "string", "licenseExpiration": number, "licenseType": "string", "modified": number, "name": "string", "networkAccessControl": { "prefixListIds": [ "string" ], "vpceIds": [ "string" ] }, "notificationDestinations": [ "string" ], "organizationalUnits": [ "string" ], "organizationRoleName": "string", "permissionType": "string", "stackSetName": "string", "status": "string", "tags": { "string" : "string" }, "vpcConfiguration": { "securityGroupIds": [ "string" ], "subnetIds": [ "string" ] }, "workspaceRoleArn": "string" } } Response Elements If the action is successful, the service sends back an HTTP 202 response. The following data is returned in JSON format by the service. Response Elements API Version 2020-08-18 56 API Reference Amazon Managed Grafana workspace A structure containing information about the workspace. Type: WorkspaceDescription object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: Errors API Version 2020-08-18 57 API Reference Amazon Managed Grafana • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 58 Amazon Managed Grafana ListPermissions API Reference Lists the users and groups who have the Grafana Admin and Editor roles in this workspace. If you use this operation without specifying userId or groupId, the operation returns the roles of all users and groups. If you specify a userId or a groupId, only the roles for that user or group are returned. If you do this, you can specify only one userId or one groupId. Request Syntax GET /workspaces/workspaceId/permissions? groupId=groupId&maxResults=maxResults&nextToken=nextToken&userId=userId&userType=userType HTTP/1.1 URI Request Parameters The request uses the following URI parameters. groupId (Optional) Limits the results to only the group that matches this ID. Length Constraints: Minimum length of 1. Maximum length of 47. maxResults The maximum number of results to include in the response. Valid Range: Minimum value of 1. Maximum value of 100. nextToken The token to use when requesting the next set of results. You received this token from a previous ListPermissions operation. userId (Optional) Limits the results to only the user that matches this ID. Length Constraints: Minimum length of 1. Maximum length of 47. ListPermissions API Version 2020-08-18 59 Amazon Managed Grafana userType API Reference (Optional) If you specify SSO_USER, then only the permissions of IAM Identity Center users are returned. If you specify SSO_GROUP, only the permissions of IAM Identity Center groups are returned. Valid Values: SSO_USER | SSO_GROUP workspaceId The ID of the workspace to list permissions for. This parameter is required. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "nextToken": "string", "permissions": [ { "role": "string", "user": { "id": "string", "type": "string" } } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. Request Body API Version 2020-08-18 60 Amazon Managed Grafana API Reference The following data is returned in JSON format by the service. nextToken The token to use in a subsequent ListPermissions operation to return the next set of results. Type: String permissions The permissions returned by the operation. Type: Array of PermissionEntry objects Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. Errors API Version 2020-08-18 61 Amazon Managed Grafana HTTP Status Code: 400 See Also API Reference 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 v2 • AWS SDK for Java V2 • |
amg-api-013 | amg-api.pdf | 13 | references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. Errors API Version 2020-08-18 61 Amazon Managed Grafana HTTP Status Code: 400 See Also API Reference 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 62 Amazon Managed Grafana API Reference ListTagsForResource The ListTagsForResource operation returns the tags that are associated with the Amazon Managed Service for Grafana resource specified by the resourceArn. Currently, the only resource that can be tagged is a workspace. Request Syntax GET /tags/resourceArn HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceArn The ARN of the resource the list of tags are associated with. Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "tags": { "string" : "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. ListTagsForResource API Version 2020-08-18 63 Amazon Managed Grafana API Reference The following data is returned in JSON format by the service. tags The list of tags that are associated with the resource. 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. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. Errors API Version 2020-08-18 64 Amazon Managed Grafana HTTP Status Code: 400 See Also API Reference 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 65 Amazon Managed Grafana ListVersions API Reference Lists available versions of Grafana. These are available when calling CreateWorkspace. Optionally, include a workspace to list the versions to which it can be upgraded. Request Syntax GET /versions?maxResults=maxResults&nextToken=nextToken&workspace-id=workspaceId HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum number of results to include in the response. Valid Range: Minimum value of 1. Maximum value of 100. nextToken The token to use when requesting the next set of results. You receive this token from a previous ListVersions operation. workspaceId The ID of the workspace to list the available upgrade versions. If not included, lists all versions of Grafana that are supported for CreateWorkspace. Pattern: ^g-[0-9a-f]{10}$ Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json ListVersions API Version 2020-08-18 66 Amazon Managed Grafana API Reference { "grafanaVersions": [ "string" ], "nextToken": "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. grafanaVersions The Grafana versions available to create. If a workspace ID is included in the request, the Grafana versions to which this workspace can be upgraded. Type: Array of strings Length Constraints: Minimum length of 1. Maximum length of 255. nextToken The token to use in a subsequent ListVersions operation to return the next set of results. Type: String Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 Response Elements API Version 2020-08-18 67 API Reference Amazon Managed Grafana ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because |
amg-api-014 | amg-api.pdf | 14 | of 1. Maximum length of 255. nextToken The token to use in a subsequent ListVersions operation to return the next set of results. Type: String Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 Response Elements API Version 2020-08-18 67 API Reference Amazon Managed Grafana ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 68 Amazon Managed Grafana ListWorkspaces API Reference Returns a list of Amazon Managed Grafana workspaces in the account, with some information about each workspace. For more complete information about one workspace, use DescribeWorkspace. Request Syntax GET /workspaces?maxResults=maxResults&nextToken=nextToken HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum number of workspaces to include in the results. Valid Range: Minimum value of 1. Maximum value of 100. nextToken The token for the next set of workspaces to return. (You receive this token from a previous ListWorkspaces operation.) Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "nextToken": "string", "workspaces": [ { "authentication": { ListWorkspaces API Version 2020-08-18 69 Amazon Managed Grafana API Reference "providers": [ "string" ], "samlConfigurationStatus": "string" }, "created": number, "description": "string", "endpoint": "string", "grafanaToken": "string", "grafanaVersion": "string", "id": "string", "licenseType": "string", "modified": number, "name": "string", "notificationDestinations": [ "string" ], "status": "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. nextToken The token to use when requesting the next set of workspaces. Type: String workspaces An array of structures that contain some information about the workspaces in the account. Type: Array of WorkspaceSummary objects Errors For information about the errors that are common to all actions, see Common Errors. Response Elements API Version 2020-08-18 70 Amazon Managed Grafana AccessDeniedException API Reference You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 71 Amazon Managed Grafana API Reference ListWorkspaceServiceAccounts Returns a list of service accounts for a workspace. Service accounts are only available for workspaces that are compatible with Grafana version 9 and above. Request Syntax GET /workspaces/workspaceId/serviceaccounts?maxResults=maxResults&nextToken=nextToken HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum number of service accounts to include in the results. Valid Range: Minimum value of 1. Maximum value of 100. nextToken The token for the next set of service accounts to return. (You receive this token from a previous ListWorkspaceServiceAccounts operation.) workspaceId The workspace for which to list service accounts. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 ListWorkspaceServiceAccounts API Version 2020-08-18 72 Amazon Managed Grafana API Reference Content-type: application/json { "nextToken": "string", "serviceAccounts": [ { "grafanaRole": "string", "id": "string", "isDisabled": "string", "name": "string" } ], "workspaceId": "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. nextToken The token to use when requesting the next set of service accounts. Type: String serviceAccounts An array of structures containing information about the service accounts. Type: Array of ServiceAccountSummary objects workspaceId The workspace to which the service accounts are associated. Type: String Pattern: ^g-[0-9a-f]{10}$ Errors For information |
amg-api-015 | amg-api.pdf | 15 | Amazon Managed Grafana API Reference Content-type: application/json { "nextToken": "string", "serviceAccounts": [ { "grafanaRole": "string", "id": "string", "isDisabled": "string", "name": "string" } ], "workspaceId": "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. nextToken The token to use when requesting the next set of service accounts. Type: String serviceAccounts An array of structures containing information about the service accounts. Type: Array of ServiceAccountSummary objects workspaceId The workspace to which the service accounts are associated. Type: String Pattern: ^g-[0-9a-f]{10}$ Errors For information about the errors that are common to all actions, see Common Errors. Response Elements API Version 2020-08-18 73 Amazon Managed Grafana AccessDeniedException API Reference You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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++ See Also API Version 2020-08-18 74 Amazon Managed Grafana • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2020-08-18 75 Amazon Managed Grafana API Reference ListWorkspaceServiceAccountTokens Returns a list of tokens for a workspace service account. Note This does not return the key for each token. You cannot access keys after they are created. To create a new key, delete the token and recreate it. Service accounts are only available for workspaces that are compatible with Grafana version 9 and above. Request Syntax GET /workspaces/workspaceId/serviceaccounts/serviceAccountId/tokens? maxResults=maxResults&nextToken=nextToken HTTP/1.1 URI Request Parameters The request uses the following URI parameters. maxResults The maximum number of tokens to include in the results. Valid Range: Minimum value of 1. Maximum value of 100. nextToken The token for the next set of service accounts to return. (You receive this token from a previous ListWorkspaceServiceAccountTokens operation.) serviceAccountId The ID of the service account for which to return tokens. Required: Yes workspaceId The ID of the workspace for which to return tokens. ListWorkspaceServiceAccountTokens API Version 2020-08-18 76 Amazon Managed Grafana API Reference Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request does not have a request body. Response Syntax HTTP/1.1 200 Content-type: application/json { "nextToken": "string", "serviceAccountId": "string", "serviceAccountTokens": [ { "createdAt": number, "expiresAt": number, "id": "string", "lastUsedAt": number, "name": "string" } ], "workspaceId": "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. nextToken The token to use when requesting the next set of service accounts. Type: String serviceAccountId The ID of the service account where the tokens reside. Request Body API Version 2020-08-18 77 API Reference Amazon Managed Grafana Type: String serviceAccountTokens An array of structures containing information about the tokens. Type: Array of ServiceAccountTokenSummary objects workspaceId The ID of the workspace where the tokens reside. Type: String Pattern: ^g-[0-9a-f]{10}$ Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. Errors API Version 2020-08-18 78 Amazon Managed Grafana HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. HTTP Status Code: 400 See Also API Reference 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 79 Amazon Managed Grafana TagResource |
amg-api-016 | amg-api.pdf | 16 | value of a parameter in the request caused an error. HTTP Status Code: 400 See Also API Reference 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 79 Amazon Managed Grafana TagResource API Reference The TagResource operation associates tags with an Amazon Managed Grafana resource. Currently, the only resource that can be tagged is workspaces. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. 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. 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 The ARN of the resource the tag is associated with. Required: Yes Request Body The request accepts the following data in JSON format. tags The list of tag keys and values to associate with the resource. You can associate tag keys only, tags (key and values) only or a combination of tag keys and tags. Type: String to string map TagResource API Version 2020-08-18 80 Amazon Managed Grafana API Reference 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: 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. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 Response Syntax API Version 2020-08-18 81 Amazon Managed Grafana ValidationException The value of a parameter in the request caused an error. API Reference 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 82 Amazon Managed Grafana UntagResource API Reference The UntagResource operation removes the association of the tag with the Amazon Managed Grafana resource. Request Syntax DELETE /tags/resourceArn?tagKeys=tagKeys HTTP/1.1 URI Request Parameters The request uses the following URI parameters. resourceArn The ARN of the resource the tag association is removed from. Required: Yes tagKeys The key values of the tag to be removed from the resource. Length Constraints: Minimum length of 1. Maximum length of 128. 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. UntagResource API Version 2020-08-18 83 Amazon Managed Grafana Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 Errors API Version 2020-08-18 84 Amazon Managed Grafana • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby |
amg-api-017 | amg-api.pdf | 17 | Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 Errors API Version 2020-08-18 84 Amazon Managed Grafana • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference See Also API Version 2020-08-18 85 Amazon Managed Grafana UpdatePermissions API Reference Updates which users in a workspace have the Grafana Admin or Editor roles. Request Syntax PATCH /workspaces/workspaceId/permissions HTTP/1.1 Content-type: application/json { "updateInstructionBatch": [ { "action": "string", "role": "string", "users": [ { "id": "string", "type": "string" } ] } ] } URI Request Parameters The request uses the following URI parameters. workspaceId The ID of the workspace to update. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request accepts the following data in JSON format. UpdatePermissions API Version 2020-08-18 86 Amazon Managed Grafana updateInstructionBatch API Reference An array of structures that contain the permission updates to make. Type: Array of UpdateInstruction objects Array Members: Minimum number of 0 items. Maximum number of 20 items. Required: Yes Response Syntax HTTP/1.1 200 Content-type: application/json { "errors": [ { "causedBy": { "action": "string", "role": "string", "users": [ { "id": "string", "type": "string" } ] }, "code": number, "message": "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 An array of structures that contain the errors from the operation, if any. Response Syntax API Version 2020-08-18 87 Amazon Managed Grafana API Reference Type: Array of UpdateError objects Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 Errors API Version 2020-08-18 88 API Reference Amazon Managed Grafana • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 89 Amazon Managed Grafana UpdateWorkspace API Reference Modifies an existing Amazon Managed Grafana workspace. If you use this operation and omit any optional parameters, the existing values of those parameters are not changed. To modify the user authentication methods that the workspace uses, such as SAML or IAM Identity Center, use UpdateWorkspaceAuthentication. To modify which users in the workspace have the Admin and Editor Grafana roles, use UpdatePermissions. Request Syntax PUT /workspaces/workspaceId HTTP/1.1 Content-type: application/json { "accountAccessType": "string", "networkAccessControl": { "prefixListIds": [ "string" ], "vpceIds": [ "string" ] }, "organizationRoleName": "string", "permissionType": "string", "removeNetworkAccessConfiguration": boolean, "removeVpcConfiguration": boolean, "stackSetName": "string", "vpcConfiguration": { "securityGroupIds": [ "string" ], "subnetIds": [ "string" ] }, "workspaceDataSources": [ "string" ], "workspaceDescription": "string", "workspaceName": "string", "workspaceNotificationDestinations": [ "string" ], "workspaceOrganizationalUnits": [ "string" ], "workspaceRoleArn": "string" } URI Request Parameters The request uses the following URI parameters. UpdateWorkspace API Version 2020-08-18 90 Amazon Managed Grafana workspaceId The ID of the workspace to update. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body API Reference The request accepts the following data in JSON format. accountAccessType Specifies whether the workspace can access AWS resources in this AWS account only, or whether it can also access AWS resources in other accounts in the same organization. If you specify ORGANIZATION, you must specify which organizational units the workspace can access in the workspaceOrganizationalUnits parameter. Type: String Valid Values: CURRENT_ACCOUNT | ORGANIZATION Required: No networkAccessControl The configuration settings for network access to your workspace. When this is configured, only listed IP addresses and VPC endpoints will be able to access your workspace. Standard Grafana authentication and authorization will still be required. If this is not configured, or is removed, then all IP addresses and VPC endpoints will be allowed. Standard Grafana authentication and authorization will still be required. Type: NetworkAccessConfiguration object Required: No organizationRoleName The name of an IAM |
amg-api-018 | amg-api.pdf | 18 | specify ORGANIZATION, you must specify which organizational units the workspace can access in the workspaceOrganizationalUnits parameter. Type: String Valid Values: CURRENT_ACCOUNT | ORGANIZATION Required: No networkAccessControl The configuration settings for network access to your workspace. When this is configured, only listed IP addresses and VPC endpoints will be able to access your workspace. Standard Grafana authentication and authorization will still be required. If this is not configured, or is removed, then all IP addresses and VPC endpoints will be allowed. Standard Grafana authentication and authorization will still be required. Type: NetworkAccessConfiguration object Required: No organizationRoleName The name of an IAM role that already exists to use to access resources through Organizations. This can only be used with a workspace that has the permissionType set to CUSTOMER_MANAGED. Request Body API Version 2020-08-18 91 Amazon Managed Grafana Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 2048. Required: No permissionType Use this parameter if you want to change a workspace from SERVICE_MANAGED to CUSTOMER_MANAGED. This allows you to manage the permissions that the workspace uses to access datasources and notification channels. If the workspace is in a member AWS account of an organization, and that account is not a delegated administrator account, and you want the workspace to access data sources in other AWS accounts in the organization, you must choose CUSTOMER_MANAGED. If you specify this as CUSTOMER_MANAGED, you must also specify a workspaceRoleArn that the workspace will use for accessing AWS resources. For more information on the role and permissions needed, see Amazon Managed Grafana permissions and policies for AWS data sources and notification channels Note Do not use this to convert a CUSTOMER_MANAGED workspace to SERVICE_MANAGED. Do not include this parameter if you want to leave the workspace as SERVICE_MANAGED. You can convert a CUSTOMER_MANAGED workspace to SERVICE_MANAGED using the Amazon Managed Grafana console. For more information, see Managing permissions for data sources and notification channels. Type: String Valid Values: CUSTOMER_MANAGED | SERVICE_MANAGED Required: No removeNetworkAccessConfiguration Whether to remove the network access configuration from the workspace. Setting this to true and providing a networkAccessControl to set will return an error. Request Body API Version 2020-08-18 92 Amazon Managed Grafana API Reference If you remove this configuration by setting this to true, then all IP addresses and VPC endpoints will be allowed. Standard Grafana authentication and authorization will still be required. Type: Boolean Required: No removeVpcConfiguration Whether to remove the VPC configuration from the workspace. Setting this to true and providing a vpcConfiguration to set will return an error. Type: Boolean Required: No stackSetName The name of the AWS CloudFormation stack set to use to generate IAM roles to be used for this workspace. Type: String Required: No vpcConfiguration The configuration settings for an Amazon VPC that contains data sources for your Grafana workspace to connect to. Type: VpcConfiguration object Required: No workspaceDataSources This parameter is for internal use only, and should not be used. Type: Array of strings Valid Values: AMAZON_OPENSEARCH_SERVICE | CLOUDWATCH | PROMETHEUS | XRAY | TIMESTREAM | SITEWISE | ATHENA | REDSHIFT | TWINMAKER Required: No Request Body API Version 2020-08-18 93 Amazon Managed Grafana workspaceDescription API Reference A description for the workspace. This is used only to help you identify this workspace. Type: String Length Constraints: Minimum length of 0. Maximum length of 2048. Required: No workspaceName A new name for the workspace to update. Type: String Pattern: ^[a-zA-Z0-9-._~]{1,255}$ Required: No workspaceNotificationDestinations Specify the AWS notification channels that you plan to use in this workspace. Specifying these data sources here enables Amazon Managed Grafana to create IAM roles and permissions that allow Amazon Managed Grafana to use these channels. Type: Array of strings Valid Values: SNS Required: No workspaceOrganizationalUnits Specifies the organizational units that this workspace is allowed to use data sources from, if this workspace is in an account that is part of an organization. Type: Array of strings Required: No workspaceRoleArn Specifies an IAM role that grants permissions to AWS resources that the workspace accesses, such as data sources and notification channels. If this workspace has permissionType CUSTOMER_MANAGED, then this role is required. Request Body API Version 2020-08-18 94 Amazon Managed Grafana Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 2048. Required: No Response Syntax HTTP/1.1 202 Content-type: application/json { "workspace": { "accountAccessType": "string", "authentication": { "providers": [ "string" ], "samlConfigurationStatus": "string" }, "created": number, "dataSources": [ "string" ], "description": "string", "endpoint": "string", "freeTrialConsumed": boolean, "freeTrialExpiration": number, "grafanaToken": "string", "grafanaVersion": "string", "id": "string", "licenseExpiration": number, "licenseType": "string", "modified": number, "name": "string", "networkAccessControl": { "prefixListIds": [ "string" ], "vpceIds": [ "string" ] }, "notificationDestinations": [ "string" ], "organizationalUnits": [ "string" ], "organizationRoleName": "string", "permissionType": "string", "stackSetName": "string", "status": "string", "tags": { "string" : "string" Response Syntax API Version 2020-08-18 95 API Reference Amazon Managed Grafana }, |
amg-api-019 | amg-api.pdf | 19 | of 1. Maximum length of 2048. Required: No Response Syntax HTTP/1.1 202 Content-type: application/json { "workspace": { "accountAccessType": "string", "authentication": { "providers": [ "string" ], "samlConfigurationStatus": "string" }, "created": number, "dataSources": [ "string" ], "description": "string", "endpoint": "string", "freeTrialConsumed": boolean, "freeTrialExpiration": number, "grafanaToken": "string", "grafanaVersion": "string", "id": "string", "licenseExpiration": number, "licenseType": "string", "modified": number, "name": "string", "networkAccessControl": { "prefixListIds": [ "string" ], "vpceIds": [ "string" ] }, "notificationDestinations": [ "string" ], "organizationalUnits": [ "string" ], "organizationRoleName": "string", "permissionType": "string", "stackSetName": "string", "status": "string", "tags": { "string" : "string" Response Syntax API Version 2020-08-18 95 API Reference Amazon Managed Grafana }, "vpcConfiguration": { "securityGroupIds": [ "string" ], "subnetIds": [ "string" ] }, "workspaceRoleArn": "string" } } Response Elements If the action is successful, the service sends back an HTTP 202 response. The following data is returned in JSON format by the service. workspace A structure containing data about the workspace that was created. Type: WorkspaceDescription object Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 Response Elements API Version 2020-08-18 96 API Reference Amazon Managed Grafana ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 97 Amazon Managed Grafana API Reference UpdateWorkspaceAuthentication Use this operation to define the identity provider (IdP) that this workspace authenticates users from, using SAML. You can also map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace. Note Changes to the authentication method for a workspace may take a few minutes to take effect. Request Syntax POST /workspaces/workspaceId/authentication HTTP/1.1 Content-type: application/json { "authenticationProviders": [ "string" ], "samlConfiguration": { "allowedOrganizations": [ "string" ], "assertionAttributes": { "email": "string", "groups": "string", "login": "string", "name": "string", "org": "string", "role": "string" }, "idpMetadata": { ... }, "loginValidityDuration": number, "roleValues": { "admin": [ "string" ], "editor": [ "string" ] } } } UpdateWorkspaceAuthentication API Version 2020-08-18 98 Amazon Managed Grafana API Reference URI Request Parameters The request uses the following URI parameters. workspaceId The ID of the workspace to update the authentication for. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request accepts the following data in JSON format. authenticationProviders Specifies whether this workspace uses SAML 2.0, AWS IAM Identity Center, or both to authenticate users for using the Grafana console within a workspace. For more information, see User authentication in Amazon Managed Grafana. Type: Array of strings Valid Values: AWS_SSO | SAML Required: Yes samlConfiguration If the workspace uses SAML, use this structure to map SAML assertion attributes to workspace user information and define which groups in the assertion attribute are to have the Admin and Editor roles in the workspace. Type: SamlConfiguration object Required: No Response Syntax HTTP/1.1 200 URI Request Parameters API Version 2020-08-18 99 Amazon Managed Grafana API Reference Content-type: application/json { "authentication": { "awsSso": { "ssoClientId": "string" }, "providers": [ "string" ], "saml": { "configuration": { "allowedOrganizations": [ "string" ], "assertionAttributes": { "email": "string", "groups": "string", "login": "string", "name": "string", "org": "string", "role": "string" }, "idpMetadata": { ... }, "loginValidityDuration": number, "roleValues": { "admin": [ "string" ], "editor": [ "string" ] } }, "status": "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. authentication A structure that describes the user authentication for this workspace after the update is made. Type: AuthenticationDescription object Response Elements API Version 2020-08-18 100 Amazon Managed Grafana Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. |
amg-api-020 | amg-api.pdf | 20 | response. The following data is returned in JSON format by the service. authentication A structure that describes the user authentication for this workspace after the update is made. Type: AuthenticationDescription object Response Elements API Version 2020-08-18 100 Amazon Managed Grafana Errors API Reference For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 InternalServerException Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 Errors API Version 2020-08-18 101 API Reference Amazon Managed Grafana • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 102 Amazon Managed Grafana API Reference UpdateWorkspaceConfiguration Updates the configuration string for the given workspace Request Syntax PUT /workspaces/workspaceId/configuration HTTP/1.1 Content-type: application/json { "configuration": "string", "grafanaVersion": "string" } URI Request Parameters The request uses the following URI parameters. workspaceId The ID of the workspace to update. Pattern: ^g-[0-9a-f]{10}$ Required: Yes Request Body The request accepts the following data in JSON format. configuration The new configuration string for the workspace. For more information about the format and configuration options available, see Working in your Grafana workspace. Type: String Length Constraints: Minimum length of 2. Maximum length of 65536. Required: Yes UpdateWorkspaceConfiguration API Version 2020-08-18 103 Amazon Managed Grafana grafanaVersion API Reference Specifies the version of Grafana to support in the workspace. If not specified, keeps the current version of the workspace. Can only be used to upgrade (for example, from 8.4 to 9.4), not downgrade (for example, from 9.4 to 8.4). To know what versions are available to upgrade to for a specific workspace, see the ListVersions operation. Type: String Length Constraints: Minimum length of 1. Maximum length of 255. Required: No Response Syntax HTTP/1.1 202 Response Elements If the action is successful, the service sends back an HTTP 202 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. AccessDeniedException You do not have sufficient permissions to perform this action. HTTP Status Code: 403 ConflictException A resource was in an inconsistent state during an update or a deletion. HTTP Status Code: 409 Response Syntax API Version 2020-08-18 104 Amazon Managed Grafana InternalServerException API Reference Unexpected error while processing the request. Retry the request. HTTP Status Code: 500 ResourceNotFoundException The request references a resource that does not exist. HTTP Status Code: 404 ThrottlingException The request was denied because of request throttling. Retry the request. HTTP Status Code: 429 ValidationException The value of a parameter in the request caused an error. 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 v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 See Also API Version 2020-08-18 105 Amazon Managed Grafana Data Types API Reference The Amazon Managed Grafana API contains several data types that various actions use. This section describes each data type in detail. Note The order of each element in a data type structure is not guaranteed. Applications should not assume a particular order. The following data types are supported: • AssertionAttributes • AuthenticationDescription • AuthenticationSummary • AwsSsoAuthentication • IdpMetadata • NetworkAccessConfiguration • PermissionEntry • RoleValues • SamlAuthentication • SamlConfiguration • ServiceAccountSummary • ServiceAccountTokenSummary • ServiceAccountTokenSummaryWithKey • UpdateError • UpdateInstruction • User • ValidationExceptionField • VpcConfiguration • WorkspaceDescription • WorkspaceSummary API Version 2020-08-18 106 Amazon Managed Grafana API Reference API Version 2020-08-18 107 Amazon Managed Grafana AssertionAttributes API Reference A structure that defines which attributes in the IdP assertion are to be used to define information about the users authenticated by the IdP to use the workspace. Contents email The name of the attribute within the SAML assertion to use as the |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.