ProvisionIpamByoasnCommand

Provisions your Autonomous System Number (ASN) for use in your Amazon Web Services account. This action requires authorization context for Amazon to bring the ASN to an Amazon Web Services account. For more information, see Tutorial: Bring your ASN to IPAM  in the Amazon VPC IPAM guide.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { EC2Client, ProvisionIpamByoasnCommand } from "@aws-sdk/client-ec2"; // ES Modules import
// const { EC2Client, ProvisionIpamByoasnCommand } = require("@aws-sdk/client-ec2"); // CommonJS import
const client = new EC2Client(config);
const input = { // ProvisionIpamByoasnRequest
  DryRun: true || false,
  IpamId: "STRING_VALUE", // required
  Asn: "STRING_VALUE", // required
  AsnAuthorizationContext: { // AsnAuthorizationContext
    Message: "STRING_VALUE", // required
    Signature: "STRING_VALUE", // required
  },
};
const command = new ProvisionIpamByoasnCommand(input);
const response = await client.send(command);
// { // ProvisionIpamByoasnResult
//   Byoasn: { // Byoasn
//     Asn: "STRING_VALUE",
//     IpamId: "STRING_VALUE",
//     StatusMessage: "STRING_VALUE",
//     State: "deprovisioned" || "failed-deprovision" || "failed-provision" || "pending-deprovision" || "pending-provision" || "provisioned",
//   },
// };

ProvisionIpamByoasnCommand Input

See ProvisionIpamByoasnCommandInput for more details

Parameter
Type
Description
Asn
Required
string | undefined

A public 2-byte or 4-byte ASN.

AsnAuthorizationContext
Required
AsnAuthorizationContext | undefined

An ASN authorization context.

IpamId
Required
string | undefined

An IPAM ID.

DryRun
boolean | undefined

Checks 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 DryRunOperation. Otherwise, it is UnauthorizedOperation.

ProvisionIpamByoasnCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
Byoasn
Byoasn | undefined

An ASN and BYOIP CIDR association.

Throws

Name
Fault
Details
EC2ServiceException
Base exception class for all service exceptions from EC2 service.