- 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.
GetIpamDiscoveredResourceCidrsCommand
Returns the resource CIDRs that are monitored as part of a resource discovery. A discovered resource is a resource CIDR monitored under a resource discovery. The following resources can be discovered: VPCs, Public IPv4 pools, VPC subnets, and Elastic IP addresses.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { EC2Client, GetIpamDiscoveredResourceCidrsCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, GetIpamDiscoveredResourceCidrsCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const input = { // GetIpamDiscoveredResourceCidrsRequest
DryRun: true || false,
IpamResourceDiscoveryId: "STRING_VALUE", // required
ResourceRegion: "STRING_VALUE", // required
Filters: [ // FilterList
{ // Filter
Name: "STRING_VALUE",
Values: [ // ValueStringList
"STRING_VALUE",
],
},
],
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
};
const command = new GetIpamDiscoveredResourceCidrsCommand(input);
const response = await client.send(command);
// { // GetIpamDiscoveredResourceCidrsResult
// IpamDiscoveredResourceCidrs: [ // IpamDiscoveredResourceCidrSet
// { // IpamDiscoveredResourceCidr
// IpamResourceDiscoveryId: "STRING_VALUE",
// ResourceRegion: "STRING_VALUE",
// ResourceId: "STRING_VALUE",
// ResourceOwnerId: "STRING_VALUE",
// ResourceCidr: "STRING_VALUE",
// IpSource: "amazon" || "byoip" || "none",
// ResourceType: "vpc" || "subnet" || "eip" || "public-ipv4-pool" || "ipv6-pool" || "eni",
// ResourceTags: [ // IpamResourceTagList
// { // IpamResourceTag
// Key: "STRING_VALUE",
// Value: "STRING_VALUE",
// },
// ],
// IpUsage: Number("double"),
// VpcId: "STRING_VALUE",
// SubnetId: "STRING_VALUE",
// NetworkInterfaceAttachmentStatus: "available" || "in-use",
// SampleTime: new Date("TIMESTAMP"),
// AvailabilityZoneId: "STRING_VALUE",
// },
// ],
// NextToken: "STRING_VALUE",
// };
GetIpamDiscoveredResourceCidrsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
IpamResourceDiscoveryId Required | string | undefined | A resource discovery ID. |
ResourceRegion Required | string | undefined | A resource Region. |
DryRun | boolean | undefined | A check for whether you have the required permissions for the action without actually making the request and provides an error response. If you have the required permissions, the error response is |
Filters | Filter[] | undefined | Filters. |
MaxResults | number | undefined | The maximum number of discovered resource CIDRs to return in one page of results. |
NextToken | string | undefined | Specify the pagination token from a previous request to retrieve the next page of results. |
GetIpamDiscoveredResourceCidrsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
IpamDiscoveredResourceCidrs | IpamDiscoveredResourceCidr[] | undefined | Discovered resource CIDRs. |
NextToken | string | undefined | Specify the pagination token from a previous request to retrieve the next page of results. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
EC2ServiceException | Base exception class for all service exceptions from EC2 service. |