API Documentation | Deno Module Docs | Original docs from AWS-JS-SDK
import { Outposts } from "https://aws-api.deno.dev/v0.3/services/outposts.ts";
// Generation parameters: // aws-sdk-js definitions from v2.1060.0 // AWS service UID: outposts-2019-12-03 // code generation: v0.3 // generated at: 2025-08-16 // Originally served at https://aws-api.deno.dev/v0.3/services/outposts.ts // Autogenerated API client for: AWS Outposts import * as client from "https://deno.land/x/aws_api@v0.6.0/client/common.ts"; import * as cmnP from "https://deno.land/x/aws_api@v0.6.0/encoding/common.ts"; import * as jsonP from "https://deno.land/x/aws_api@v0.6.0/encoding/json.ts"; export class Outposts { #client: client.ServiceClient; constructor(apiFactory: client.ApiFactory) { this.#client = apiFactory.buildServiceClient(Outposts.ApiMetadata); } static ApiMetadata: client.ApiMetadata = { "apiVersion": "2019-12-03", "endpointPrefix": "outposts", "jsonVersion": "1.1", "protocol": "rest-json", "serviceAbbreviation": "Outposts", "serviceFullName": "AWS Outposts", "serviceId": "Outposts", "signatureVersion": "v4", "signingName": "outposts", "uid": "outposts-2019-12-03" }; /** Cancels an order for an Outpost. */ async cancelOrder( params: CancelOrderInput, opts: client.RequestOptions = {}, ): Promise<void> { const resp = await this.#client.performRequest({ opts, action: "CancelOrder", requestUri: cmnP.encodePath`/orders/${params["OrderId"]}/cancel`, }); await resp.body?.cancel(); } /** Creates an order for an Outpost. */ async createOrder( params: CreateOrderInput, opts: client.RequestOptions = {}, ): Promise<CreateOrderOutput> { const body: jsonP.JSONObject = { OutpostIdentifier: params["OutpostIdentifier"], LineItems: params["LineItems"]?.map(x => fromLineItemRequest(x)), PaymentOption: params["PaymentOption"], PaymentTerm: params["PaymentTerm"], }; const resp = await this.#client.performRequest({ opts, body, action: "CreateOrder", requestUri: "/orders", }); return jsonP.readObj({ required: {}, optional: { "Order": toOrder, }, }, await resp.json()); } /** Creates an Outpost. */ async createOutpost( params: CreateOutpostInput, opts: client.RequestOptions = {}, ): Promise<CreateOutpostOutput> { const body: jsonP.JSONObject = { Name: params["Name"], Description: params["Description"], SiteId: params["SiteId"], AvailabilityZone: params["AvailabilityZone"], AvailabilityZoneId: params["AvailabilityZoneId"], Tags: params["Tags"], SupportedHardwareType: params["SupportedHardwareType"], }; const resp = await this.#client.performRequest({ opts, body, action: "CreateOutpost", requestUri: "/outposts", }); return jsonP.readObj({ required: {}, optional: { "Outpost": toOutpost, }, }, await resp.json()); } /** Creates a site for an Outpost. */ async createSite( params: CreateSiteInput, opts: client.RequestOptions = {}, ): Promise<CreateSiteOutput> { const body: jsonP.JSONObject = { Name: params["Name"], Description: params["Description"], Notes: params["Notes"], Tags: params["Tags"], OperatingAddress: fromAddress(params["OperatingAddress"]), ShippingAddress: fromAddress(params["ShippingAddress"]), RackPhysicalProperties: fromRackPhysicalProperties(params["RackPhysicalProperties"]), }; const resp = await this.#client.performRequest({ opts, body, action: "CreateSite", requestUri: "/sites", }); return jsonP.readObj({ required: {}, optional: { "Site": toSite, }, }, await resp.json()); } /** Deletes the Outpost. */ async deleteOutpost( params: DeleteOutpostInput, opts: client.RequestOptions = {}, ): Promise<void> { const resp = await this.#client.performRequest({ opts, action: "DeleteOutpost", method: "DELETE", requestUri: cmnP.encodePath`/outposts/${params["OutpostId"]}`, }); await resp.body?.cancel(); } /** Deletes the site. */ async deleteSite( params: DeleteSiteInput, opts: client.RequestOptions = {}, ): Promise<void> { const resp = await this.#client.performRequest({ opts, action: "DeleteSite", method: "DELETE", requestUri: cmnP.encodePath`/sites/${params["SiteId"]}`, }); await resp.body?.cancel(); } /** Gets information about a catalog item. */ async getCatalogItem( params: GetCatalogItemInput, opts: client.RequestOptions = {}, ): Promise<GetCatalogItemOutput> { const resp = await this.#client.performRequest({ opts, action: "GetCatalogItem", method: "GET", requestUri: cmnP.encodePath`/catalog/item/${params["CatalogItemId"]}`, }); return jsonP.readObj({ required: {}, optional: { "CatalogItem": toCatalogItem, }, }, await resp.json()); } /** Gets an order. */ async getOrder( params: GetOrderInput, opts: client.RequestOptions = {}, ): Promise<GetOrderOutput> { const resp = await this.#client.performRequest({ opts, action: "GetOrder", method: "GET", requestUri: cmnP.encodePath`/orders/${params["OrderId"]}`, }); return jsonP.readObj({ required: {}, optional: { "Order": toOrder, }, }, await resp.json()); } /** Gets information about the specified Outpost. */ async getOutpost( params: GetOutpostInput, opts: client.RequestOptions = {}, ): Promise<GetOutpostOutput> { const resp = await this.#client.performRequest({ opts, action: "GetOutpost", method: "GET", requestUri: cmnP.encodePath`/outposts/${params["OutpostId"]}`, }); return jsonP.readObj({ required: {}, optional: { "Outpost": toOutpost, }, }, await resp.json()); } /** Lists the instance types for the specified Outpost. */ async getOutpostInstanceTypes( params: GetOutpostInstanceTypesInput, opts: client.RequestOptions = {}, ): Promise<GetOutpostInstanceTypesOutput> { const query = new URLSearchParams; if (params["NextToken"] != null) query.set("NextToken", params["NextToken"]?.toString() ?? ""); if (params["MaxResults"] != null) query.set("MaxResults", params["MaxResults"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "GetOutpostInstanceTypes", method: "GET", requestUri: cmnP.encodePath`/outposts/${params["OutpostId"]}/instanceTypes`, }); return jsonP.readObj({ required: {}, optional: { "InstanceTypes": [toInstanceTypeItem], "NextToken": "s", "OutpostId": "s", "OutpostArn": "s", }, }, await resp.json()); } /** Gets information about the specified Outpost site. */ async getSite( params: GetSiteInput, opts: client.RequestOptions = {}, ): Promise<GetSiteOutput> { const resp = await this.#client.performRequest({ opts, action: "GetSite", method: "GET", requestUri: cmnP.encodePath`/sites/${params["SiteId"]}`, }); return jsonP.readObj({ required: {}, optional: { "Site": toSite, }, }, await resp.json()); } /** Gets the site address. */ async getSiteAddress( params: GetSiteAddressInput, opts: client.RequestOptions = {}, ): Promise<GetSiteAddressOutput> { const query = new URLSearchParams; query.set("AddressType", params["AddressType"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "GetSiteAddress", method: "GET", requestUri: cmnP.encodePath`/sites/${params["SiteId"]}/address`, }); return jsonP.readObj({ required: {}, optional: { "SiteId": "s", "AddressType": (x: jsonP.JSONValue) => cmnP.readEnum<AddressType>(x), "Address": toAddress, }, }, await resp.json()); } /** Use to create a list of every item in the catalog. */ async listCatalogItems( params: ListCatalogItemsInput = {}, opts: client.RequestOptions = {}, ): Promise<ListCatalogItemsOutput> { const query = new URLSearchParams; if (params["NextToken"] != null) query.set("NextToken", params["NextToken"]?.toString() ?? ""); if (params["MaxResults"] != null) query.set("MaxResults", params["MaxResults"]?.toString() ?? ""); for (const item of params["ItemClassFilter"] ?? []) { query.append("ItemClassFilter", item?.toString() ?? ""); } for (const item of params["SupportedStorageFilter"] ?? []) { query.append("SupportedStorageFilter", item?.toString() ?? ""); } for (const item of params["EC2FamilyFilter"] ?? []) { query.append("EC2FamilyFilter", item?.toString() ?? ""); } const resp = await this.#client.performRequest({ opts, query, action: "ListCatalogItems", method: "GET", requestUri: "/catalog/items", }); return jsonP.readObj({ required: {}, optional: { "CatalogItems": [toCatalogItem], "NextToken": "s", }, }, await resp.json()); } /** Create a list of the Outpost orders for your Amazon Web Services account. */ async listOrders( params: ListOrdersInput = {}, opts: client.RequestOptions = {}, ): Promise<ListOrdersOutput> { const query = new URLSearchParams; if (params["OutpostIdentifierFilter"] != null) query.set("OutpostIdentifierFilter", params["OutpostIdentifierFilter"]?.toString() ?? ""); if (params["NextToken"] != null) query.set("NextToken", params["NextToken"]?.toString() ?? ""); if (params["MaxResults"] != null) query.set("MaxResults", params["MaxResults"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListOrders", method: "GET", requestUri: "/list-orders", }); return jsonP.readObj({ required: {}, optional: { "Orders": [toOrderSummary], "NextToken": "s", }, }, await resp.json()); } /** Create a list of the Outposts for your Amazon Web Services account. */ async listOutposts( params: ListOutpostsInput = {}, opts: client.RequestOptions = {}, ): Promise<ListOutpostsOutput> { const query = new URLSearchParams; if (params["NextToken"] != null) query.set("NextToken", params["NextToken"]?.toString() ?? ""); if (params["MaxResults"] != null) query.set("MaxResults", params["MaxResults"]?.toString() ?? ""); for (const item of params["LifeCycleStatusFilter"] ?? []) { query.append("LifeCycleStatusFilter", item?.toString() ?? ""); } for (const item of params["AvailabilityZoneFilter"] ?? []) { query.append("AvailabilityZoneFilter", item?.toString() ?? ""); } for (const item of params["AvailabilityZoneIdFilter"] ?? []) { query.append("AvailabilityZoneIdFilter", item?.toString() ?? ""); } const resp = await this.#client.performRequest({ opts, query, action: "ListOutposts", method: "GET", requestUri: "/outposts", }); return jsonP.readObj({ required: {}, optional: { "Outposts": [toOutpost], "NextToken": "s", }, }, await resp.json()); } /** Lists the sites for your Amazon Web Services account. */ async listSites( params: ListSitesInput = {}, opts: client.RequestOptions = {}, ): Promise<ListSitesOutput> { const query = new URLSearchParams; if (params["NextToken"] != null) query.set("NextToken", params["NextToken"]?.toString() ?? ""); if (params["MaxResults"] != null) query.set("MaxResults", params["MaxResults"]?.toString() ?? ""); const resp = await this.#client.performRequest({ opts, query, action: "ListSites", method: "GET", requestUri: "/sites", }); return jsonP.readObj({ required: {}, optional: { "Sites": [toSite], "NextToken": "s", }, }, await resp.json()); } /** Lists the tags for the specified resource. */ async listTagsForResource( params: ListTagsForResourceRequest, opts: client.RequestOptions = {}, ): Promise<ListTagsForResourceResponse> { const resp = await this.#client.performRequest({ opts, action: "ListTagsForResource", method: "GET", requestUri: cmnP.encodePath`/tags/${params["ResourceArn"]}`, }); return jsonP.readObj({ required: {}, optional: { "Tags": x => jsonP.readMap(String, String, x), }, }, await resp.json()); } /** Adds tags to the specified resource. */ async tagResource( params: TagResourceRequest, opts: client.RequestOptions = {}, ): Promise<void> { const body: jsonP.JSONObject = { Tags: params["Tags"], }; const resp = await this.#client.performRequest({ opts, body, action: "TagResource", requestUri: cmnP.encodePath`/tags/${params["ResourceArn"]}`, }); await resp.body?.cancel(); } /** Removes tags from the specified resource. */ async untagResource( params: UntagResourceRequest, opts: client.RequestOptions = {}, ): Promise<void> { const query = new URLSearchParams; for (const item of params["TagKeys"]) { query.append("tagKeys", item?.toString() ?? ""); } const resp = await this.#client.performRequest({ opts, query, action: "UntagResource", method: "DELETE", requestUri: cmnP.encodePath`/tags/${params["ResourceArn"]}`, }); await resp.body?.cancel(); } /** Updates an Outpost. */ async updateOutpost( params: UpdateOutpostInput, opts: client.RequestOptions = {}, ): Promise<UpdateOutpostOutput> { const body: jsonP.JSONObject = { Name: params["Name"], Description: params["Description"], SupportedHardwareType: params["SupportedHardwareType"], }; const resp = await this.#client.performRequest({ opts, body, action: "UpdateOutpost", method: "PATCH", requestUri: cmnP.encodePath`/outposts/${params["OutpostId"]}`, }); return jsonP.readObj({ required: {}, optional: { "Outpost": toOutpost, }, }, await resp.json()); } /** Updates the site. */ async updateSite( params: UpdateSiteInput, opts: client.RequestOptions = {}, ): Promise<UpdateSiteOutput> { const body: jsonP.JSONObject = { Name: params["Name"], Description: params["Description"], Notes: params["Notes"], }; const resp = await this.#client.performRequest({ opts, body, action: "UpdateSite", method: "PATCH", requestUri: cmnP.encodePath`/sites/${params["SiteId"]}`, }); return jsonP.readObj({ required: {}, optional: { "Site": toSite, }, }, await resp.json()); } /** Updates the site address. */ async updateSiteAddress( params: UpdateSiteAddressInput, opts: client.RequestOptions = {}, ): Promise<UpdateSiteAddressOutput> { const body: jsonP.JSONObject = { AddressType: params["AddressType"], Address: fromAddress(params["Address"]), }; const resp = await this.#client.performRequest({ opts, body, action: "UpdateSiteAddress", method: "PUT", requestUri: cmnP.encodePath`/sites/${params["SiteId"]}/address`, }); return jsonP.readObj({ required: {}, optional: { "AddressType": (x: jsonP.JSONValue) => cmnP.readEnum<AddressType>(x), "Address": toAddress, }, }, await resp.json()); } /** Update the physical and logistical details for a rack at a site. */ async updateSiteRackPhysicalProperties( params: UpdateSiteRackPhysicalPropertiesInput, opts: client.RequestOptions = {}, ): Promise<UpdateSiteRackPhysicalPropertiesOutput> { const body: jsonP.JSONObject = { PowerDrawKva: params["PowerDrawKva"], PowerPhase: params["PowerPhase"], PowerConnector: params["PowerConnector"], PowerFeedDrop: params["PowerFeedDrop"], UplinkGbps: params["UplinkGbps"], UplinkCount: params["UplinkCount"], FiberOpticCableType: params["FiberOpticCableType"], OpticalStandard: params["OpticalStandard"], MaximumSupportedWeightLbs: params["MaximumSupportedWeightLbs"], }; const resp = await this.#client.performRequest({ opts, body, action: "UpdateSiteRackPhysicalProperties", method: "PATCH", requestUri: cmnP.encodePath`/sites/${params["SiteId"]}/rackPhysicalProperties`, }); return jsonP.readObj({ required: {}, optional: { "Site": toSite, }, }, await resp.json()); } } // refs: 1 - tags: named, input export interface CancelOrderInput { /** The ID of the order to cancel. */ OrderId: string; } // refs: 1 - tags: named, input export interface CreateOrderInput { /** The ID or the Amazon Resource Name (ARN) of the Outpost. */ OutpostIdentifier: string; /** The line items that make up the order. */ LineItems: LineItemRequest[]; /** The payment option for the order. */ PaymentOption: PaymentOption; /** The payment terms for the order. */ PaymentTerm?: PaymentTerm | null; } // refs: 1 - tags: named, input export interface CreateOutpostInput { Name: string; Description?: string | null; /** The ID or the Amazon Resource Name (ARN) of the site. */ SiteId: string; AvailabilityZone?: string | null; AvailabilityZoneId?: string | null; /** The tags to apply to the Outpost. */ Tags?: { [key: string]: string | null | undefined } | null; /** The type of hardware for this Outpost. */ SupportedHardwareType?: SupportedHardwareType | null; } // refs: 1 - tags: named, input export interface CreateSiteInput { Name: string; Description?: string | null; /** Additional information that you provide about site access requirements, electrician scheduling, personal protective equipment, or regulation of equipment materials that could affect your installation process. */ Notes?: string | null; /** The tags to apply to a site. */ Tags?: { [key: string]: string | null | undefined } | null; /** The location to install and power on the hardware. */ OperatingAddress?: Address | null; /** The location to ship the hardware. */ ShippingAddress?: Address | null; /** Information about the physical and logistical details for the rack at this site. */ RackPhysicalProperties?: RackPhysicalProperties | null; } // refs: 1 - tags: named, input export interface DeleteOutpostInput { /** The ID or the Amazon Resource Name (ARN) of the Outpost. */ OutpostId: string; } // refs: 1 - tags: named, input export interface DeleteSiteInput { /** The ID or the Amazon Resource Name (ARN) of the site. */ SiteId: string; } // refs: 1 - tags: named, input export interface GetCatalogItemInput { /** The ID of the catalog item. */ CatalogItemId: string; } // refs: 1 - tags: named, input export interface GetOrderInput { /** The ID of the order. */ OrderId: string; } // refs: 1 - tags: named, input export interface GetOutpostInput { /** The ID or the Amazon Resource Name (ARN) of the Outpost. */ OutpostId: string; } // refs: 1 - tags: named, input export interface GetOutpostInstanceTypesInput { /** The ID or the Amazon Resource Name (ARN) of the Outpost. */ OutpostId: string; NextToken?: string | null; MaxResults?: number | null; } // refs: 1 - tags: named, input export interface GetSiteInput { /** The ID or the Amazon Resource Name (ARN) of the site. */ SiteId: string; } // refs: 1 - tags: named, input export interface GetSiteAddressInput { /** The ID or the Amazon Resource Name (ARN) of the site. */ SiteId: string; /** The type of the address you request. */ AddressType: AddressType; } // refs: 1 - tags: named, input export interface ListCatalogItemsInput { NextToken?: string | null; MaxResults?: number | null; /** A filter for the class of items in the catalog. */ ItemClassFilter?: CatalogItemClass[] | null; /** A filter for the storage options of items in the catalog. */ SupportedStorageFilter?: SupportedStorageEnum[] | null; /** A filter for EC2 family options for items in the catalog. */ EC2FamilyFilter?: string[] | null; } // refs: 1 - tags: named, input export interface ListOrdersInput { /** The ID or the Amazon Resource Name (ARN) of the Outpost. */ OutpostIdentifierFilter?: string | null; NextToken?: string | null; MaxResults?: number | null; } // refs: 1 - tags: named, input export interface ListOutpostsInput { NextToken?: string | null; MaxResults?: number | null; /** A filter for the lifecycle status of the Outpost. */ LifeCycleStatusFilter?: string[] | null; /** A filter for the Availability Zone (`us-east-1a`) of the Outpost. */ AvailabilityZoneFilter?: string[] | null; /** A filter for the AZ IDs (`use1-az1`) of the Outpost. */ AvailabilityZoneIdFilter?: string[] | null; } // refs: 1 - tags: named, input export interface ListSitesInput { NextToken?: string | null; MaxResults?: number | null; } // refs: 1 - tags: named, input export interface ListTagsForResourceRequest { /** The Amazon Resource Name (ARN) of the resource. */ ResourceArn: string; } // refs: 1 - tags: named, input export interface TagResourceRequest { /** The Amazon Resource Name (ARN) of the resource. */ ResourceArn: string; /** The tags to add to the resource. */ Tags: { [key: string]: string | null | undefined }; } // refs: 1 - tags: named, input export interface UntagResourceRequest { /** The Amazon Resource Name (ARN) of the resource. */ ResourceArn: string; /** The tag keys. */ TagKeys: string[]; } // refs: 1 - tags: named, input export interface UpdateOutpostInput { /** The ID or the Amazon Resource Name (ARN) of the Outpost. */ OutpostId: string; Name?: string | null; Description?: string | null; /** The type of hardware for this Outpost. */ SupportedHardwareType?: SupportedHardwareType | null; } // refs: 1 - tags: named, input export interface UpdateSiteInput { /** The ID or the Amazon Resource Name (ARN) of the site. */ SiteId: string; Name?: string | null; Description?: string | null; /** Notes about a site. */ Notes?: string | null; } // refs: 1 - tags: named, input export interface UpdateSiteAddressInput { /** The ID or the Amazon Resource Name (ARN) of the site. */ SiteId: string; /** The type of the address. */ AddressType: AddressType; /** The address for the site. */ Address: Address; } // refs: 1 - tags: named, input export interface UpdateSiteRackPhysicalPropertiesInput { /** The ID or the Amazon Resource Name (ARN) of the site. */ SiteId: string; /** Specify in kVA the power draw available at the hardware placement position for the rack. */ PowerDrawKva?: PowerDrawKva | null; /** Specify the power option that you can provide for hardware. */ PowerPhase?: PowerPhase | null; /** Specify the power connector that Amazon Web Services should plan to provide for connections to the hardware. */ PowerConnector?: PowerConnector | null; /** Specify whether the power feed comes above or below the rack. */ PowerFeedDrop?: PowerFeedDrop | null; /** Specify the uplink speed the rack should support for the connection to the Region. */ UplinkGbps?: UplinkGbps | null; /** Racks come with two Outpost network devices. */ UplinkCount?: UplinkCount | null; /** Specify the type of fiber that you will use to attach the Outpost to your network. */ FiberOpticCableType?: FiberOpticCableType | null; /** Specify the type of optical standard that you will use to attach the Outpost to your network. */ OpticalStandard?: OpticalStandard | null; /** Specify the maximum rack weight that this site can support. */ MaximumSupportedWeightLbs?: MaximumSupportedWeightLbs | null; } // refs: 1 - tags: named, output export interface CreateOrderOutput { /** Information about this order. */ Order?: Order | null; } // refs: 1 - tags: named, output export interface CreateOutpostOutput { Outpost?: Outpost | null; } // refs: 1 - tags: named, output export interface CreateSiteOutput { Site?: Site | null; } // refs: 1 - tags: named, output export interface GetCatalogItemOutput { /** Information about this catalog item. */ CatalogItem?: CatalogItem | null; } // refs: 1 - tags: named, output export interface GetOrderOutput { Order?: Order | null; } // refs: 1 - tags: named, output export interface GetOutpostOutput { Outpost?: Outpost | null; } // refs: 1 - tags: named, output export interface GetOutpostInstanceTypesOutput { InstanceTypes?: InstanceTypeItem[] | null; NextToken?: string | null; /** The ID of the Outpost. */ OutpostId?: string | null; OutpostArn?: string | null; } // refs: 1 - tags: named, output export interface GetSiteOutput { Site?: Site | null; } // refs: 1 - tags: named, output export interface GetSiteAddressOutput { SiteId?: string | null; /** The type of the address you receive. */ AddressType?: AddressType | null; /** Information about the address. */ Address?: Address | null; } // refs: 1 - tags: named, output export interface ListCatalogItemsOutput { /** Information about the catalog items. */ CatalogItems?: CatalogItem[] | null; NextToken?: string | null; } // refs: 1 - tags: named, output export interface ListOrdersOutput { /** Information about the orders. */ Orders?: OrderSummary[] | null; NextToken?: string | null; } // refs: 1 - tags: named, output export interface ListOutpostsOutput { Outposts?: Outpost[] | null; NextToken?: string | null; } // refs: 1 - tags: named, output export interface ListSitesOutput { Sites?: Site[] | null; NextToken?: string | null; } // refs: 1 - tags: named, output export interface ListTagsForResourceResponse { /** The resource tags. */ Tags?: { [key: string]: string | null | undefined } | null; } // refs: 1 - tags: named, output export interface UpdateOutpostOutput { Outpost?: Outpost | null; } // refs: 1 - tags: named, output export interface UpdateSiteOutput { Site?: Site | null; } // refs: 1 - tags: named, output export interface UpdateSiteAddressOutput { /** The type of the address. */ AddressType?: AddressType | null; /** Information about an address. */ Address?: Address | null; } // refs: 1 - tags: named, output export interface UpdateSiteRackPhysicalPropertiesOutput { Site?: Site | null; } // refs: 1 - tags: input, named, interface /** Information about a line item request. */ export interface LineItemRequest { /** The ID of the catalog item. */ CatalogItemId?: string | null; /** The quantity of a line item request. */ Quantity?: number | null; } function fromLineItemRequest(input?: LineItemRequest | null): jsonP.JSONValue { if (!input) return input; return { CatalogItemId: input["CatalogItemId"], Quantity: input["Quantity"], } } // refs: 3 - tags: input, named, enum, output export type PaymentOption = | "ALL_UPFRONT" | "NO_UPFRONT" | "PARTIAL_UPFRONT" | cmnP.UnexpectedEnumValue; // refs: 1 - tags: input, named, enum export type PaymentTerm = | "THREE_YEARS" | cmnP.UnexpectedEnumValue; // refs: 6 - tags: input, named, enum, output export type SupportedHardwareType = | "RACK" | "SERVER" | cmnP.UnexpectedEnumValue; // refs: 5 - tags: input, named, interface, output /** Information about an address. */ export interface Address { /** The name of the contact. */ ContactName?: string | null; /** The phone number of the contact. */ ContactPhoneNumber?: string | null; /** The first line of the address. */ AddressLine1: string; /** The second line of the address. */ AddressLine2?: string | null; /** The third line of the address. */ AddressLine3?: string | null; /** The city for the address. */ City: string; /** The state for the address. */ StateOrRegion: string; /** The district or county for the address. */ DistrictOrCounty?: string | null; /** The postal code for the address. */ PostalCode: string; /** The ISO-3166 two-letter country code for the address. */ CountryCode: string; /** The municipality for the address. */ Municipality?: string | null; } function fromAddress(input?: Address | null): jsonP.JSONValue { if (!input) return input; return { ContactName: input["ContactName"], ContactPhoneNumber: input["ContactPhoneNumber"], AddressLine1: input["AddressLine1"], AddressLine2: input["AddressLine2"], AddressLine3: input["AddressLine3"], City: input["City"], StateOrRegion: input["StateOrRegion"], DistrictOrCounty: input["DistrictOrCounty"], PostalCode: input["PostalCode"], CountryCode: input["CountryCode"], Municipality: input["Municipality"], } } function toAddress(root: jsonP.JSONValue): Address { return jsonP.readObj({ required: { "AddressLine1": "s", "City": "s", "StateOrRegion": "s", "PostalCode": "s", "CountryCode": "s", }, optional: { "ContactName": "s", "ContactPhoneNumber": "s", "AddressLine2": "s", "AddressLine3": "s", "DistrictOrCounty": "s", "Municipality": "s", }, }, root); } // refs: 6 - tags: input, named, interface, output /** Information about the physical and logistical details for racks at sites. */ export interface RackPhysicalProperties { /** The power draw available at the hardware placement position for the rack. */ PowerDrawKva?: PowerDrawKva | null; /** The power option that you can provide for hardware. */ PowerPhase?: PowerPhase | null; /** The power connector for the hardware. */ PowerConnector?: PowerConnector | null; /** The position of the power feed. */ PowerFeedDrop?: PowerFeedDrop | null; /** The uplink speed the rack supports for the connection to the Region. */ UplinkGbps?: UplinkGbps | null; /** The number of uplinks each Outpost network device. */ UplinkCount?: UplinkCount | null; /** The type of fiber used to attach the Outpost to the network. */ FiberOpticCableType?: FiberOpticCableType | null; /** The type of optical standard used to attach the Outpost to the network. */ OpticalStandard?: OpticalStandard | null; /** The maximum rack weight that this site can support. */ MaximumSupportedWeightLbs?: MaximumSupportedWeightLbs | null; } function fromRackPhysicalProperties(input?: RackPhysicalProperties | null): jsonP.JSONValue { if (!input) return input; return { PowerDrawKva: input["PowerDrawKva"], PowerPhase: input["PowerPhase"], PowerConnector: input["PowerConnector"], PowerFeedDrop: input["PowerFeedDrop"], UplinkGbps: input["UplinkGbps"], UplinkCount: input["UplinkCount"], FiberOpticCableType: input["FiberOpticCableType"], OpticalStandard: input["OpticalStandard"], MaximumSupportedWeightLbs: input["MaximumSupportedWeightLbs"], } } function toRackPhysicalProperties(root: jsonP.JSONValue): RackPhysicalProperties { return jsonP.readObj({ required: {}, optional: { "PowerDrawKva": (x: jsonP.JSONValue) => cmnP.readEnum<PowerDrawKva>(x), "PowerPhase": (x: jsonP.JSONValue) => cmnP.readEnum<PowerPhase>(x), "PowerConnector": (x: jsonP.JSONValue) => cmnP.readEnum<PowerConnector>(x), "PowerFeedDrop": (x: jsonP.JSONValue) => cmnP.readEnum<PowerFeedDrop>(x), "UplinkGbps": (x: jsonP.JSONValue) => cmnP.readEnum<UplinkGbps>(x), "UplinkCount": (x: jsonP.JSONValue) => cmnP.readEnum<UplinkCount>(x), "FiberOpticCableType": (x: jsonP.JSONValue) => cmnP.readEnum<FiberOpticCableType>(x), "OpticalStandard": (x: jsonP.JSONValue) => cmnP.readEnum<OpticalStandard>(x), "MaximumSupportedWeightLbs": (x: jsonP.JSONValue) => cmnP.readEnum<MaximumSupportedWeightLbs>(x), }, }, root); } // refs: 7 - tags: input, named, enum, output export type PowerDrawKva = | "POWER_5_KVA" | "POWER_10_KVA" | "POWER_15_KVA" | cmnP.UnexpectedEnumValue; // refs: 7 - tags: input, named, enum, output export type PowerPhase = | "SINGLE_PHASE" | "THREE_PHASE" | cmnP.UnexpectedEnumValue; // refs: 7 - tags: input, named, enum, output export type PowerConnector = | "L6_30P" | "IEC309" | "AH530P7W" | "AH532P6W" | cmnP.UnexpectedEnumValue; // refs: 7 - tags: input, named, enum, output export type PowerFeedDrop = | "ABOVE_RACK" | "BELOW_RACK" | cmnP.UnexpectedEnumValue; // refs: 7 - tags: input, named, enum, output export type UplinkGbps = | "UPLINK_1G" | "UPLINK_10G" | "UPLINK_40G" | "UPLINK_100G" | cmnP.UnexpectedEnumValue; // refs: 7 - tags: input, named, enum, output export type UplinkCount = | "UPLINK_COUNT_1" | "UPLINK_COUNT_2" | "UPLINK_COUNT_3" | "UPLINK_COUNT_4" | "UPLINK_COUNT_5" | "UPLINK_COUNT_6" | "UPLINK_COUNT_7" | "UPLINK_COUNT_8" | "UPLINK_COUNT_12" | "UPLINK_COUNT_16" | cmnP.UnexpectedEnumValue; // refs: 7 - tags: input, named, enum, output export type FiberOpticCableType = | "SINGLE_MODE" | "MULTI_MODE" | cmnP.UnexpectedEnumValue; // refs: 7 - tags: input, named, enum, output export type OpticalStandard = | "OPTIC_10GBASE_SR" | "OPTIC_10GBASE_IR" | "OPTIC_10GBASE_LR" | "OPTIC_40GBASE_SR" | "OPTIC_40GBASE_ESR" | "OPTIC_40GBASE_IR4_LR4L" | "OPTIC_40GBASE_LR4" | "OPTIC_100GBASE_SR4" | "OPTIC_100GBASE_CWDM4" | "OPTIC_100GBASE_LR4" | "OPTIC_100G_PSM4_MSA" | "OPTIC_1000BASE_LX" | "OPTIC_1000BASE_SX" | cmnP.UnexpectedEnumValue; // refs: 7 - tags: input, named, enum, output export type MaximumSupportedWeightLbs = | "NO_LIMIT" | "MAX_1400_LBS" | "MAX_1600_LBS" | "MAX_1800_LBS" | "MAX_2000_LBS" | cmnP.UnexpectedEnumValue; // refs: 4 - tags: input, named, enum, output export type AddressType = | "SHIPPING_ADDRESS" | "OPERATING_ADDRESS" | cmnP.UnexpectedEnumValue; // refs: 1 - tags: input, named, enum export type CatalogItemClass = | "RACK" | "SERVER" | cmnP.UnexpectedEnumValue; // refs: 3 - tags: input, named, enum, output export type SupportedStorageEnum = | "EBS" | "S3" | cmnP.UnexpectedEnumValue; // refs: 2 - tags: output, named, interface /** Information about an order. */ export interface Order { /** The ID of the Outpost in the order. */ OutpostId?: string | null; /** The ID of the order. */ OrderId?: string | null; /** The status of the order. */ Status?: OrderStatus | null; /** The line items for the order */ LineItems?: LineItem[] | null; /** The payment option for the order. */ PaymentOption?: PaymentOption | null; /** The submission date for the order. */ OrderSubmissionDate?: Date | number | null; /** The fulfillment date of the order. */ OrderFulfilledDate?: Date | number | null; } function toOrder(root: jsonP.JSONValue): Order { return jsonP.readObj({ required: {}, optional: { "OutpostId": "s", "OrderId": "s", "Status": (x: jsonP.JSONValue) => cmnP.readEnum<OrderStatus>(x), "LineItems": [toLineItem], "PaymentOption": (x: jsonP.JSONValue) => cmnP.readEnum<PaymentOption>(x), "OrderSubmissionDate": "d", "OrderFulfilledDate": "d", }, }, root); } // refs: 3 - tags: output, named, enum export type OrderStatus = | "RECEIVED" | "PENDING" | "PROCESSING" | "INSTALLING" | "FULFILLED" | "CANCELLED" | "PREPARING" | "IN_PROGRESS" | "COMPLETED" | "ERROR" | cmnP.UnexpectedEnumValue; // refs: 2 - tags: output, named, interface /** Information about a line item. */ export interface LineItem { /** The ID of the catalog item. */ CatalogItemId?: string | null; /** The ID of the line item. */ LineItemId?: string | null; /** The quantity of the line item. */ Quantity?: number | null; /** The status of the line item. */ Status?: LineItemStatus | null; } function toLineItem(root: jsonP.JSONValue): LineItem { return jsonP.readObj({ required: {}, optional: { "CatalogItemId": "s", "LineItemId": "s", "Quantity": "n", "Status": (x: jsonP.JSONValue) => cmnP.readEnum<LineItemStatus>(x), }, }, root); } // refs: 3 - tags: output, named, enum export type LineItemStatus = | "PREPARING" | "BUILDING" | "SHIPPED" | "DELIVERED" | "INSTALLING" | "INSTALLED" | "ERROR" | "CANCELLED" | cmnP.UnexpectedEnumValue; // refs: 4 - tags: output, named, interface /** Information about an Outpost. */ export interface Outpost { /** The ID of the Outpost. */ OutpostId?: string | null; OwnerId?: string | null; OutpostArn?: string | null; SiteId?: string | null; Name?: string | null; Description?: string | null; LifeCycleStatus?: string | null; AvailabilityZone?: string | null; AvailabilityZoneId?: string | null; /** The Outpost tags. */ Tags?: { [key: string]: string | null | undefined } | null; SiteArn?: string | null; /** The hardware type. */ SupportedHardwareType?: SupportedHardwareType | null; } function toOutpost(root: jsonP.JSONValue): Outpost { return jsonP.readObj({ required: {}, optional: { "OutpostId": "s", "OwnerId": "s", "OutpostArn": "s", "SiteId": "s", "Name": "s", "Description": "s", "LifeCycleStatus": "s", "AvailabilityZone": "s", "AvailabilityZoneId": "s", "Tags": x => jsonP.readMap(String, String, x), "SiteArn": "s", "SupportedHardwareType": (x: jsonP.JSONValue) => cmnP.readEnum<SupportedHardwareType>(x), }, }, root); } // refs: 5 - tags: output, named, interface /** Information about a site. */ export interface Site { SiteId?: string | null; AccountId?: string | null; Name?: string | null; Description?: string | null; /** The site tags. */ Tags?: { [key: string]: string | null | undefined } | null; SiteArn?: string | null; /** Notes about a site. */ Notes?: string | null; /** The ISO-3166 two-letter country code where the hardware is installed and powered on. */ OperatingAddressCountryCode?: string | null; /** State or region where the hardware is installed and powered on. */ OperatingAddressStateOrRegion?: string | null; /** City where the hardware is installed and powered on. */ OperatingAddressCity?: string | null; /** Information about the physical and logistical details for a rack at the site. */ RackPhysicalProperties?: RackPhysicalProperties | null; } function toSite(root: jsonP.JSONValue): Site { return jsonP.readObj({ required: {}, optional: { "SiteId": "s", "AccountId": "s", "Name": "s", "Description": "s", "Tags": x => jsonP.readMap(String, String, x), "SiteArn": "s", "Notes": "s", "OperatingAddressCountryCode": "s", "OperatingAddressStateOrRegion": "s", "OperatingAddressCity": "s", "RackPhysicalProperties": toRackPhysicalProperties, }, }, root); } // refs: 2 - tags: output, named, interface /** Information about a catalog item. */ export interface CatalogItem { /** The ID of the catalog item. */ CatalogItemId?: string | null; /** The status of a catalog item. */ ItemStatus?: CatalogItemStatus | null; /** Information about the EC2 capacity of an item. */ EC2Capacities?: EC2Capacity[] | null; /** Information about the power draw of an item. */ PowerKva?: number | null; /** The weight of the item in pounds. */ WeightLbs?: number | null; /** The uplink speed this catalog item requires for the connection to the Region. */ SupportedUplinkGbps?: number[] | null; /** The supported storage options for the catalog item. */ SupportedStorage?: SupportedStorageEnum[] | null; } function toCatalogItem(root: jsonP.JSONValue): CatalogItem { return jsonP.readObj({ required: {}, optional: { "CatalogItemId": "s", "ItemStatus": (x: jsonP.JSONValue) => cmnP.readEnum<CatalogItemStatus>(x), "EC2Capacities": [toEC2Capacity], "PowerKva": "n", "WeightLbs": "n", "SupportedUplinkGbps": ["n"], "SupportedStorage": [(x: jsonP.JSONValue) => cmnP.readEnum<SupportedStorageEnum>(x)], }, }, root); } // refs: 2 - tags: output, named, enum export type CatalogItemStatus = | "AVAILABLE" | "DISCONTINUED" | cmnP.UnexpectedEnumValue; // refs: 2 - tags: output, named, interface /** Information about EC2 capacity. */ export interface EC2Capacity { /** The family of the EC2 capacity. */ Family?: string | null; /** The maximum size of the EC2 capacity. */ MaxSize?: string | null; /** The quantity of the EC2 capacity. */ Quantity?: string | null; } function toEC2Capacity(root: jsonP.JSONValue): EC2Capacity { return jsonP.readObj({ required: {}, optional: { "Family": "s", "MaxSize": "s", "Quantity": "s", }, }, root); } // refs: 1 - tags: output, named, interface /** Information about an instance type. */ export interface InstanceTypeItem { InstanceType?: string | null; } function toInstanceTypeItem(root: jsonP.JSONValue): InstanceTypeItem { return jsonP.readObj({ required: {}, optional: { "InstanceType": "s", }, }, root); } // refs: 1 - tags: output, named, interface /** A summary of line items in your order. */ export interface OrderSummary { /** The ID of the Outpost. */ OutpostId?: string | null; /** The ID of the order. */ OrderId?: string | null; /** The type of order. */ OrderType?: OrderType | null; /** The status of the order. */ Status?: OrderStatus | null; /** The status of all line items in the order. */ LineItemCountsByStatus?: { [key in LineItemStatus]: number | null | undefined } | null; /** Submission date for the order. */ OrderSubmissionDate?: Date | number | null; /** Fulfilment date for the order. */ OrderFulfilledDate?: Date | number | null; } function toOrderSummary(root: jsonP.JSONValue): OrderSummary { return jsonP.readObj({ required: {}, optional: { "OutpostId": "s", "OrderId": "s", "OrderType": (x: jsonP.JSONValue) => cmnP.readEnum<OrderType>(x), "Status": (x: jsonP.JSONValue) => cmnP.readEnum<OrderStatus>(x), "LineItemCountsByStatus": x => jsonP.readMap(x => cmnP.readEnumReq<LineItemStatus>(x), Number, x), "OrderSubmissionDate": "d", "OrderFulfilledDate": "d", }, }, root); } // refs: 1 - tags: output, named, enum export type OrderType = | "OUTPOST" | "REPLACEMENT" | cmnP.UnexpectedEnumValue;