UNPKG

pulumi-stripe

Version:

A Pulumi package for creating and managing Stripe resources.

196 lines (195 loc) 7.67 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "./types/input"; import * as outputs from "./types/output"; /** * This object represents files hosted on Stripe's servers - [Stripe API file documentation](https://stripe.com/docs/api/files). * You can upload files with the create file request (for example, when uploading dispute evidence). * * Stripe File upload [guide](https://stripe.com/docs/file-upload#uploading-a-file) * * > Update or removal of the file isn't supported through the Stripe API. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as fs from "fs"; * import * as stripe from "pulumi-stripe"; * * // minimal file field * const logoFile = new stripe.File("logoFile", { * filename: "logo.jpg", * purpose: "business_logo", * base64content: fs.readFileSync(`${HOME}/logo.jpg`, { encoding: "base64" }), * }); * // file with file link * const logoIndex_fileFile = new stripe.File("logoIndex/fileFile", { * filename: "logo.jpg", * purpose: "business_logo", * base64content: fs.readFileSync(`${HOME}/logo.jpg`, { encoding: "base64" }), * linkData: { * create: true, * expiresAt: 1826659124, * }, * }); * ``` * * ## Import * * ```sh * $ pulumi import stripe:index/file:File file <file_id> * ``` */ export declare class File extends pulumi.CustomResource { /** * Get an existing File 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<pulumi.ID>, state?: FileState, opts?: pulumi.CustomResourceOptions): File; /** * Returns true if the given object is an instance of File. 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 File; /** * String. A content file to upload encoded by Base64, * ideally use Terraform function filebase64 . */ readonly base64content: pulumi.Output<string>; /** * String. Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: pulumi.Output<number>; /** * Int. Time that the link expires. */ readonly expiresAt: pulumi.Output<number>; /** * String. The suitable name for saving the file to a filesystem. */ readonly filename: pulumi.Output<string>; /** * Optional parameters that automatically create a file link for the newly created file. */ readonly linkData: pulumi.Output<outputs.FileLinkData | undefined>; /** * List(Resource). A list of [file links](https://stripe.com/docs/api/files/object#file_links) that point at this file. * Please see details of links. */ readonly links: pulumi.Output<outputs.FileLink[]>; /** * String. String representing the object’s type. Objects of the same type share the same value. */ readonly object: pulumi.Output<string>; /** * String. The purpose of the uploaded file. One of these values are accepted: `accountRequirement`, * `additionalVerification`, `businessIcon`, `businessLogo`, `customerSignature`, `disputeEvidence`, * `documentProviderIdentityDocument`, `financeReportRun`, `identityDocument`, `identityDocumentDownloadable`, * `pciDocument`, `selfie`, `sigmaScheduledQuery`, `taxDocumentUserUpload`, `terminalReaderSplashscreen` */ readonly purpose: pulumi.Output<string>; /** * Int. The size of the file object in bytes. */ readonly size: pulumi.Output<number>; /** * String. The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). */ readonly type: pulumi.Output<string>; /** * String. The publicly accessible URL to download the file. */ readonly url: pulumi.Output<string>; /** * Create a File 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: FileArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering File resources. */ export interface FileState { /** * String. A content file to upload encoded by Base64, * ideally use Terraform function filebase64 . */ base64content?: pulumi.Input<string>; /** * String. Time at which the object was created. Measured in seconds since the Unix epoch. */ created?: pulumi.Input<number>; /** * Int. Time that the link expires. */ expiresAt?: pulumi.Input<number>; /** * String. The suitable name for saving the file to a filesystem. */ filename?: pulumi.Input<string>; /** * Optional parameters that automatically create a file link for the newly created file. */ linkData?: pulumi.Input<inputs.FileLinkData>; /** * List(Resource). A list of [file links](https://stripe.com/docs/api/files/object#file_links) that point at this file. * Please see details of links. */ links?: pulumi.Input<pulumi.Input<inputs.FileLink>[]>; /** * String. String representing the object’s type. Objects of the same type share the same value. */ object?: pulumi.Input<string>; /** * String. The purpose of the uploaded file. One of these values are accepted: `accountRequirement`, * `additionalVerification`, `businessIcon`, `businessLogo`, `customerSignature`, `disputeEvidence`, * `documentProviderIdentityDocument`, `financeReportRun`, `identityDocument`, `identityDocumentDownloadable`, * `pciDocument`, `selfie`, `sigmaScheduledQuery`, `taxDocumentUserUpload`, `terminalReaderSplashscreen` */ purpose?: pulumi.Input<string>; /** * Int. The size of the file object in bytes. */ size?: pulumi.Input<number>; /** * String. The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). */ type?: pulumi.Input<string>; /** * String. The publicly accessible URL to download the file. */ url?: pulumi.Input<string>; } /** * The set of arguments for constructing a File resource. */ export interface FileArgs { /** * String. A content file to upload encoded by Base64, * ideally use Terraform function filebase64 . */ base64content: pulumi.Input<string>; /** * String. The suitable name for saving the file to a filesystem. */ filename: pulumi.Input<string>; /** * Optional parameters that automatically create a file link for the newly created file. */ linkData?: pulumi.Input<inputs.FileLinkData>; /** * String. The purpose of the uploaded file. One of these values are accepted: `accountRequirement`, * `additionalVerification`, `businessIcon`, `businessLogo`, `customerSignature`, `disputeEvidence`, * `documentProviderIdentityDocument`, `financeReportRun`, `identityDocument`, `identityDocumentDownloadable`, * `pciDocument`, `selfie`, `sigmaScheduledQuery`, `taxDocumentUserUpload`, `terminalReaderSplashscreen` */ purpose: pulumi.Input<string>; }