@pulumi/scm
Version:
A Pulumi package for managing resources on Strata Cloud Manager.. Based on terraform-provider-scm: version v0.2.1
161 lines (160 loc) • 4.83 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* Retrieves a listing of config items.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scm from "@pulumi/scm";
*
* // This data source will call the "ListAddresses" API endpoint
* // and return all filters in the "Shared" folder.
* // 1. Use a single data block to fetch ALL addresses in the "Shared" folder.
* const allShared = scm.getAddressList({
* folder: "All",
* });
* export const addressDataSourceResultsFromList = allShared.then(allShared => .reduce((__obj, addr) => ({ ...__obj, [addr.id]: addr })));
* const paginatedAddressesExample = scm.getAddressList({
* folder: "All",
* limit: 5,
* offset: 0,
* });
* export const paginatedAddresses = paginatedAddressesExample.then(paginatedAddressesExample => .reduce((__obj, addr) => ({ ...__obj, [addr.id]: addr })));
* export const paginationAddressesDetails = {
* totalObjectsInFolder: paginatedAddressesExample.then(paginatedAddressesExample => paginatedAddressesExample.total),
* limitUsed: paginatedAddressesExample.then(paginatedAddressesExample => paginatedAddressesExample.limit),
* };
* ```
*/
export declare function getAddressList(args?: GetAddressListArgs, opts?: pulumi.InvokeOptions): Promise<GetAddressListResult>;
/**
* A collection of arguments for invoking getAddressList.
*/
export interface GetAddressListArgs {
/**
* The device of the item.
*/
device?: string;
/**
* The folder of the item. Default: Shared.
*/
folder?: string;
/**
* The max number of items to return. Default: 200.
*/
limit?: number;
/**
* The name of the item.
*/
name?: string;
/**
* The offset of the first item to return.
*/
offset?: number;
/**
* The snippet of the item.
*/
snippet?: string;
}
/**
* A collection of values returned by getAddressList.
*/
export interface GetAddressListResult {
/**
* The data.
*/
readonly datas: outputs.GetAddressListData[];
/**
* The device of the item.
*/
readonly device?: string;
/**
* The folder of the item. Default: Shared.
*/
readonly folder?: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The max number of items to return. Default: 200.
*/
readonly limit?: number;
/**
* The name of the item.
*/
readonly name?: string;
/**
* The offset of the first item to return.
*/
readonly offset?: number;
/**
* The snippet of the item.
*/
readonly snippet?: string;
readonly tfid: string;
/**
* The total number of items.
*/
readonly total: number;
}
/**
* Retrieves a listing of config items.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as scm from "@pulumi/scm";
*
* // This data source will call the "ListAddresses" API endpoint
* // and return all filters in the "Shared" folder.
* // 1. Use a single data block to fetch ALL addresses in the "Shared" folder.
* const allShared = scm.getAddressList({
* folder: "All",
* });
* export const addressDataSourceResultsFromList = allShared.then(allShared => .reduce((__obj, addr) => ({ ...__obj, [addr.id]: addr })));
* const paginatedAddressesExample = scm.getAddressList({
* folder: "All",
* limit: 5,
* offset: 0,
* });
* export const paginatedAddresses = paginatedAddressesExample.then(paginatedAddressesExample => .reduce((__obj, addr) => ({ ...__obj, [addr.id]: addr })));
* export const paginationAddressesDetails = {
* totalObjectsInFolder: paginatedAddressesExample.then(paginatedAddressesExample => paginatedAddressesExample.total),
* limitUsed: paginatedAddressesExample.then(paginatedAddressesExample => paginatedAddressesExample.limit),
* };
* ```
*/
export declare function getAddressListOutput(args?: GetAddressListOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetAddressListResult>;
/**
* A collection of arguments for invoking getAddressList.
*/
export interface GetAddressListOutputArgs {
/**
* The device of the item.
*/
device?: pulumi.Input<string>;
/**
* The folder of the item. Default: Shared.
*/
folder?: pulumi.Input<string>;
/**
* The max number of items to return. Default: 200.
*/
limit?: pulumi.Input<number>;
/**
* The name of the item.
*/
name?: pulumi.Input<string>;
/**
* The offset of the first item to return.
*/
offset?: pulumi.Input<number>;
/**
* The snippet of the item.
*/
snippet?: pulumi.Input<string>;
}