Returns a list of entity aggregates for your Organizations that are affected by each of the specified events.
+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { HealthClient, DescribeEntityAggregatesForOrganizationCommand } from "@aws-sdk/client-health"; // ES Modules import + * // const { HealthClient, DescribeEntityAggregatesForOrganizationCommand } = require("@aws-sdk/client-health"); // CommonJS import + * const client = new HealthClient(config); + * const input = { // DescribeEntityAggregatesForOrganizationRequest + * eventArns: [ // OrganizationEventArnsList // required + * "STRING_VALUE", + * ], + * awsAccountIds: [ // OrganizationAccountIdsList + * "STRING_VALUE", + * ], + * }; + * const command = new DescribeEntityAggregatesForOrganizationCommand(input); + * const response = await client.send(command); + * // { // DescribeEntityAggregatesForOrganizationResponse + * // organizationEntityAggregates: [ // OrganizationEntityAggregatesList + * // { // OrganizationEntityAggregate + * // eventArn: "STRING_VALUE", + * // count: Number("int"), + * // statuses: { // entityStatuses + * // "Base exception class for all service exceptions from Health service.
+ * + */ +export class DescribeEntityAggregatesForOrganizationCommand extends $Command< + DescribeEntityAggregatesForOrganizationCommandInput, + DescribeEntityAggregatesForOrganizationCommandOutput, + HealthClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: DescribeEntityAggregatesForOrganizationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStackThe number of entities in an account that are impacted by a specific event aggregated by the entity status codes.
+ */ +export interface AccountEntityAggregate { + /** + * @public + *The 12-digit Amazon Web Services account numbers that contains the affected entities.
+ */ + accountId?: string; + + /** + * @public + *The number of entities that match the filter criteria for the specified events.
+ */ + count?: number; + + /** + * @public + *The number of affected entities aggregated by the entity status codes.
+ */ + statuses?: RecordInformation about an entity that is affected by a Health event.
@@ -340,6 +366,37 @@ export class UnsupportedLocale extends __BaseException { } } +/** + * @public + *A JSON set of elements including the awsAccountId
, eventArn
and a set of statusCodes
.
The unique identifier for the event. The event ARN has the
+ * arn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID
+ *
+ * format.
For example, an event ARN might look like the following:
+ *
+ * arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
+ *
The 12-digit Amazon Web Services account numbers that contains the affected entities.
+ */ + awsAccountId?: string; + + /** + * @public + *A list of entity status codes.
+ */ + statusCodes?: (EntityStatusCode | string)[]; +} + /** * @public *The values used to filter results from the DescribeEventDetailsForOrganization and DescribeAffectedEntitiesForOrganization operations.
@@ -371,10 +428,12 @@ export interface EventAccountFilter { export interface DescribeAffectedEntitiesForOrganizationRequest { /** * @public + * @deprecated + * *A JSON set of elements including the awsAccountId
and the
* eventArn
.
The maximum number of items to return in one batch, between 10 and 100, inclusive.
*/ maxResults?: number; + + /** + * @public + *A JSON set of elements including the awsAccountId
, eventArn
and a set of statusCodes
.
The number of entities that match the criteria for the specified events.
*/ count?: number; + + /** + * @public + *The number of affected entities aggregated by the entity status codes.
+ */ + statuses?: RecordA list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101"
+ *
A list of 12-digit Amazon Web Services account numbers that contains the affected entities.
+ */ + awsAccountIds?: string[]; +} + +/** + * @public + *The aggregate results of entities affected by the specified event in your organization. + * The results are aggregated by the entity status codes for the specified set of accountsIDs.
+ */ +export interface OrganizationEntityAggregate { + /** + * @public + *A list of event ARNs (unique identifiers). For example: "arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456", "arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101"
+ *
The number of entities for the organization that match the filter criteria for the specified events.
+ */ + count?: number; + + /** + * @public + *The number of affected entities aggregated by the entitiy status codes.
+ */ + statuses?: RecordA list of entity aggregates for each of the specified accounts in your organization that are affected by
+ * a specific event. If there are no awsAccountIds
provided in the request, this field will be empty in the response.
The list of entity aggregates for each of the specified accounts that are affected by each of the specified events.
+ */ + organizationEntityAggregates?: OrganizationEntityAggregate[]; +} + /** * @public * @enum diff --git a/clients/client-health/src/protocols/Aws_json1_1.ts b/clients/client-health/src/protocols/Aws_json1_1.ts index faf7e5c4f0c8..63ac6485459a 100644 --- a/clients/client-health/src/protocols/Aws_json1_1.ts +++ b/clients/client-health/src/protocols/Aws_json1_1.ts @@ -34,6 +34,10 @@ import { DescribeEntityAggregatesCommandInput, DescribeEntityAggregatesCommandOutput, } from "../commands/DescribeEntityAggregatesCommand"; +import { + DescribeEntityAggregatesForOrganizationCommandInput, + DescribeEntityAggregatesForOrganizationCommandOutput, +} from "../commands/DescribeEntityAggregatesForOrganizationCommand"; import { DescribeEventAggregatesCommandInput, DescribeEventAggregatesCommandOutput, @@ -74,6 +78,7 @@ import { DescribeAffectedEntitiesForOrganizationResponse, DescribeAffectedEntitiesRequest, DescribeAffectedEntitiesResponse, + DescribeEntityAggregatesForOrganizationRequest, DescribeEntityAggregatesRequest, DescribeEventAggregatesRequest, DescribeEventDetailsForOrganizationRequest, @@ -85,6 +90,7 @@ import { DescribeEventsRequest, DescribeEventsResponse, DescribeEventTypesRequest, + EntityAccountFilter, EntityFilter, EntityStatusCode, Event, @@ -153,6 +159,19 @@ export const se_DescribeEntityAggregatesCommand = async ( return buildHttpRpcRequest(context, headers, "/", undefined, body); }; +/** + * serializeAws_json1_1DescribeEntityAggregatesForOrganizationCommand + */ +export const se_DescribeEntityAggregatesForOrganizationCommand = async ( + input: DescribeEntityAggregatesForOrganizationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const headers: __HeaderBag = sharedHeaders("DescribeEntityAggregatesForOrganization"); + let body: any; + body = JSON.stringify(_json(input)); + return buildHttpRpcRequest(context, headers, "/", undefined, body); +}; + /** * serializeAws_json1_1DescribeEventAggregatesCommand */ @@ -451,6 +470,46 @@ const de_DescribeEntityAggregatesCommandError = async ( }); }; +/** + * deserializeAws_json1_1DescribeEntityAggregatesForOrganizationCommand + */ +export const de_DescribeEntityAggregatesForOrganizationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): PromiseThe 12-digit Amazon Web Services account numbers that contains the affected entities.
" + } + }, + "count": { + "target": "com.amazonaws.health#count", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "The number of entities that match the filter criteria for the specified events.
" + } + }, + "statuses": { + "target": "com.amazonaws.health#entityStatuses", + "traits": { + "smithy.api#documentation": "The number of affected entities aggregated by the entity status codes.
" + } + } + }, + "traits": { + "smithy.api#documentation": "The number of entities in an account that are impacted by a specific event aggregated by the entity status codes.
" + } + }, + "com.amazonaws.health#AccountEntityAggregatesList": { + "type": "list", + "member": { + "target": "com.amazonaws.health#AccountEntityAggregate" + } + }, "com.amazonaws.health#AffectedEntity": { "type": "structure", "members": { @@ -1082,8 +1082,10 @@ "organizationEntityFilters": { "target": "com.amazonaws.health#OrganizationEntityFiltersList", "traits": { - "smithy.api#documentation": "A JSON set of elements including the awsAccountId
and the\n eventArn
.
A JSON set of elements including the awsAccountId
and the\n eventArn
.
The maximum number of items to return in one batch, between 10 and 100, inclusive.
" } + }, + "organizationEntityAccountFilters": { + "target": "com.amazonaws.health#OrganizationEntityAccountFiltersList", + "traits": { + "smithy.api#documentation": "A JSON set of elements including the awsAccountId
, eventArn
and a set of statusCodes
.
Returns a list of entity aggregates for your Organizations that are affected by each of the specified events.
", + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.health#DescribeEntityAggregatesForOrganizationRequest": { + "type": "structure", + "members": { + "eventArns": { + "target": "com.amazonaws.health#OrganizationEventArnsList", + "traits": { + "smithy.api#documentation": "A list of event ARNs (unique identifiers). For example: \"arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456\", \"arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101\"
\n
A list of 12-digit Amazon Web Services account numbers that contains the affected entities.
" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.health#DescribeEntityAggregatesForOrganizationResponse": { + "type": "structure", + "members": { + "organizationEntityAggregates": { + "target": "com.amazonaws.health#OrganizationEntityAggregatesList", + "traits": { + "smithy.api#documentation": "The list of entity aggregates for each of the specified accounts that are affected by each of the specified events.
" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.health#DescribeEntityAggregatesRequest": { "type": "structure", "members": { @@ -1748,6 +1804,33 @@ "smithy.api#idempotent": {} } }, + "com.amazonaws.health#EntityAccountFilter": { + "type": "structure", + "members": { + "eventArn": { + "target": "com.amazonaws.health#eventArn", + "traits": { + "smithy.api#documentation": "The unique identifier for the event. The event ARN has the\narn:aws:health:event-region::event/SERVICE/EVENT_TYPE_CODE/EVENT_TYPE_PLUS_ID\n
\nformat.
For example, an event ARN might look like the following:
\n\n arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456
\n
The 12-digit Amazon Web Services account numbers that contains the affected entities.
" + } + }, + "statusCodes": { + "target": "com.amazonaws.health#entityStatusCodeList", + "traits": { + "smithy.api#documentation": "A list of entity status codes.
" + } + } + }, + "traits": { + "smithy.api#documentation": "A JSON set of elements including the awsAccountId
, eventArn
and a set of statusCodes
.
The number of entities that match the criteria for the specified events.
" } + }, + "statuses": { + "target": "com.amazonaws.health#entityStatuses", + "traits": { + "smithy.api#documentation": "The number of affected entities aggregated by the entity status codes.
" + } } }, "traits": { @@ -2225,6 +2314,18 @@ "smithy.api#error": "client" } }, + "com.amazonaws.health#OrganizationAccountIdsList": { + "type": "list", + "member": { + "target": "com.amazonaws.health#accountId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 25 + } + } + }, "com.amazonaws.health#OrganizationAffectedEntitiesErrorItem": { "type": "structure", "members": { @@ -2257,6 +2358,57 @@ "smithy.api#documentation": "Error information returned when a DescribeAffectedEntitiesForOrganization operation can't find or process a\n specific entity.
" } }, + "com.amazonaws.health#OrganizationEntityAccountFiltersList": { + "type": "list", + "member": { + "target": "com.amazonaws.health#EntityAccountFilter" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 10 + } + } + }, + "com.amazonaws.health#OrganizationEntityAggregate": { + "type": "structure", + "members": { + "eventArn": { + "target": "com.amazonaws.health#eventArn", + "traits": { + "smithy.api#documentation": "A list of event ARNs (unique identifiers). For example: \"arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-CDE456\", \"arn:aws:health:us-west-1::event/EBS/AWS_EBS_LOST_VOLUME/AWS_EBS_LOST_VOLUME_CHI789_JKL101\"
\n
The number of entities for the organization that match the filter criteria for the specified events.
" + } + }, + "statuses": { + "target": "com.amazonaws.health#entityStatuses", + "traits": { + "smithy.api#documentation": "The number of affected entities aggregated by the entitiy status codes.
" + } + }, + "accounts": { + "target": "com.amazonaws.health#AccountEntityAggregatesList", + "traits": { + "smithy.api#documentation": "A list of entity aggregates for each of the specified accounts in your organization that are affected by\n a specific event. If there are no awsAccountIds
provided in the request, this field will be empty in the response.
The aggregate results of entities affected by the specified event in your organization.\n The results are aggregated by the entity status codes for the specified set of accountsIDs.
" + } + }, + "com.amazonaws.health#OrganizationEntityAggregatesList": { + "type": "list", + "member": { + "target": "com.amazonaws.health#OrganizationEntityAggregate" + } + }, "com.amazonaws.health#OrganizationEntityFiltersList": { "type": "list", "member": { @@ -2337,6 +2489,18 @@ "smithy.api#documentation": "Summary information about an event, returned by the DescribeEventsForOrganization operation.
" } }, + "com.amazonaws.health#OrganizationEventArnsList": { + "type": "list", + "member": { + "target": "com.amazonaws.health#eventArn" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 25 + } + } + }, "com.amazonaws.health#OrganizationEventDetailFiltersList": { "type": "list", "member": { @@ -2597,6 +2761,18 @@ "traits": { "smithy.api#enumValue": "UNKNOWN" } + }, + "PENDING": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "PENDING" + } + }, + "RESOLVED": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "RESOLVED" + } } } }, @@ -2608,10 +2784,19 @@ "traits": { "smithy.api#length": { "min": 1, - "max": 3 + "max": 5 } } }, + "com.amazonaws.health#entityStatuses": { + "type": "map", + "key": { + "target": "com.amazonaws.health#entityStatusCode" + }, + "value": { + "target": "com.amazonaws.health#count" + } + }, "com.amazonaws.health#entityUrl": { "type": "string" },