import * as pulumi from "@pulumi/pulumi"; /** * Creates and manages Scaleway API Keys. For more information, refer to the [IAM API documentation](https://www.scaleway.com/en/developers/api/iam/#api-keys-3665ae). * * ## Example Usage * * ### With application * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const ciCd = new scaleway.IamApplication("ciCd", {}); * const main = new scaleway.IamApiKey("main", { * applicationId: scaleway_iam_application.main.id, * description: "a description", * }); * ``` * * ### With user * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * * const mainIamUser = new scaleway.IamUser("mainIamUser", {email: "test@test.com"}); * const mainIamApiKey = new scaleway.IamApiKey("mainIamApiKey", { * userId: mainIamUser.id, * description: "a description", * }); * ``` * * ### With expiration * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as scaleway from "@ediri/scaleway"; * import * as time from "@pulumiverse/time"; * * const rotateAfterAYear = new time.Rotating("rotateAfterAYear", {rotationYears: 1}); * const main = new scaleway.IamApiKey("main", { * applicationId: scaleway_iam_application.main.id, * expiresAt: rotateAfterAYear.rotationRfc3339, * }); * ``` * * ## Import * * Api keys can be imported using the `{id}`, e.g. * * bash * * ```sh * $ pulumi import scaleway:index/iamApiKey:IamApiKey main 11111111111111111111 * ``` */ export declare class IamApiKey extends pulumi.CustomResource { /** * Get an existing IamApiKey resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: IamApiKeyState, opts?: pulumi.CustomResourceOptions): IamApiKey; /** * Returns true if the given object is an instance of IamApiKey. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is IamApiKey; /** * The access key of the IAM API key. */ readonly accessKey: pulumi.Output; /** * ID of the application attached to the API key. */ readonly applicationId: pulumi.Output; /** * The date and time of the creation of the IAM API key. */ readonly createdAt: pulumi.Output; /** * The IP Address of the device which created the API key. */ readonly creationIp: pulumi.Output; /** * The default Project ID to use with Object Storage. */ readonly defaultProjectId: pulumi.Output; /** * The description of the API key. */ readonly description: pulumi.Output; /** * Whether the IAM API key is editable. */ readonly editable: pulumi.Output; /** * The date and time of the expiration of the IAM API key. Please note that in case of any changes, * the resource will be recreated. */ readonly expiresAt: pulumi.Output; /** * The secret Key of the IAM API key. */ readonly secretKey: pulumi.Output; /** * The date and time of the last update of the IAM API key. */ readonly updatedAt: pulumi.Output; /** * ID of the user attached to the API key. * > **Note** You must specify at least one: `applicationId` and/or `userId`. */ readonly userId: pulumi.Output; /** * Create a IamApiKey resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: IamApiKeyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering IamApiKey resources. */ export interface IamApiKeyState { /** * The access key of the IAM API key. */ accessKey?: pulumi.Input; /** * ID of the application attached to the API key. */ applicationId?: pulumi.Input; /** * The date and time of the creation of the IAM API key. */ createdAt?: pulumi.Input; /** * The IP Address of the device which created the API key. */ creationIp?: pulumi.Input; /** * The default Project ID to use with Object Storage. */ defaultProjectId?: pulumi.Input; /** * The description of the API key. */ description?: pulumi.Input; /** * Whether the IAM API key is editable. */ editable?: pulumi.Input; /** * The date and time of the expiration of the IAM API key. Please note that in case of any changes, * the resource will be recreated. */ expiresAt?: pulumi.Input; /** * The secret Key of the IAM API key. */ secretKey?: pulumi.Input; /** * The date and time of the last update of the IAM API key. */ updatedAt?: pulumi.Input; /** * ID of the user attached to the API key. * > **Note** You must specify at least one: `applicationId` and/or `userId`. */ userId?: pulumi.Input; } /** * The set of arguments for constructing a IamApiKey resource. */ export interface IamApiKeyArgs { /** * ID of the application attached to the API key. */ applicationId?: pulumi.Input; /** * The default Project ID to use with Object Storage. */ defaultProjectId?: pulumi.Input; /** * The description of the API key. */ description?: pulumi.Input; /** * The date and time of the expiration of the IAM API key. Please note that in case of any changes, * the resource will be recreated. */ expiresAt?: pulumi.Input; /** * ID of the user attached to the API key. * > **Note** You must specify at least one: `applicationId` and/or `userId`. */ userId?: pulumi.Input; }