- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetResourceProfileCommand
Retrieves (queries) sensitive data discovery statistics and the sensitivity score for an S3 bucket.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { Macie2Client, GetResourceProfileCommand } from "@aws-sdk/client-macie2"; // ES Modules import
// const { Macie2Client, GetResourceProfileCommand } = require("@aws-sdk/client-macie2"); // CommonJS import
const client = new Macie2Client(config);
const input = { // GetResourceProfileRequest
resourceArn: "STRING_VALUE", // required
};
const command = new GetResourceProfileCommand(input);
const response = await client.send(command);
// { // GetResourceProfileResponse
// profileUpdatedAt: new Date("TIMESTAMP"),
// sensitivityScore: Number("int"),
// sensitivityScoreOverridden: true || false,
// statistics: { // ResourceStatistics
// totalBytesClassified: Number("long"),
// totalDetections: Number("long"),
// totalDetectionsSuppressed: Number("long"),
// totalItemsClassified: Number("long"),
// totalItemsSensitive: Number("long"),
// totalItemsSkipped: Number("long"),
// totalItemsSkippedInvalidEncryption: Number("long"),
// totalItemsSkippedInvalidKms: Number("long"),
// totalItemsSkippedPermissionDenied: Number("long"),
// },
// };
GetResourceProfileCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
resourceArn Required | string | undefined | The Amazon Resource Name (ARN) of the S3 bucket that the request applies to. |
GetResourceProfileCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
profileUpdatedAt | Date | undefined | The date and time, in UTC and extended ISO 8601 format, when Amazon Macie most recently recalculated sensitive data discovery statistics and details for the bucket. If the bucket's sensitivity score is calculated automatically, this includes the score. |
sensitivityScore | number | undefined | The current sensitivity score for the bucket, ranging from -1 (classification error) to 100 (sensitive). By default, this score is calculated automatically based on the amount of data that Amazon Macie has analyzed in the bucket and the amount of sensitive data that Macie has found in the bucket. |
sensitivityScoreOverridden | boolean | undefined | Specifies whether the bucket's current sensitivity score was set manually. If this value is true, the score was manually changed to 100. If this value is false, the score was calculated automatically by Amazon Macie. |
statistics | ResourceStatistics | undefined | The sensitive data discovery statistics for the bucket. The statistics capture the results of automated sensitive data discovery activities that Amazon Macie has performed for the bucket. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | Provides information about an error that occurred due to insufficient access to a specified resource. |
InternalServerException | server | Provides information about an error that occurred due to an unknown internal server error, exception, or failure. |
ResourceNotFoundException | client | Provides information about an error that occurred because a specified resource wasn't found. |
ServiceQuotaExceededException | client | Provides information about an error that occurred due to one or more service quotas for an account. |
ThrottlingException | client | Provides information about an error that occurred because too many requests were sent during a certain amount of time. |
ValidationException | client | Provides information about an error that occurred due to a syntax error in a request. |
Macie2ServiceException | Base exception class for all service exceptions from Macie2 service. |