@upcloud/pulumi-upcloud
Version:
A Pulumi package for creating and managing UpCloud resources.
160 lines (159 loc) • 6.31 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* This resource represents an UpCloud Managed Object Storage static site.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as upcloud from "@upcloud/pulumi-upcloud";
*
* const _this = new upcloud.ManagedObjectStorage("this", {
* name: "example",
* region: "europe-1",
* configuredStatus: "started",
* });
* const thisManagedObjectStorageStaticSite = new upcloud.ManagedObjectStorageStaticSite("this", {
* serviceUuid: "1201cd6f-20cd-44b6-939d-ae1c861769e7",
* bucketName: "example",
* bucketPrefix: "public/",
* errorPages: [{
* errorDocument: "404.html",
* statusCode: 404,
* }],
* });
* ```
*/
export declare class ManagedObjectStorageStaticSite extends pulumi.CustomResource {
/**
* Get an existing ManagedObjectStorageStaticSite 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?: ManagedObjectStorageStaticSiteState, opts?: pulumi.CustomResourceOptions): ManagedObjectStorageStaticSite;
/**
* Returns true if the given object is an instance of ManagedObjectStorageStaticSite. 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 ManagedObjectStorageStaticSite;
/**
* S3 bucket from which static content is served. Must have a public read policy.
*/
readonly bucketName: pulumi.Output<string>;
/**
* Path prefix within the bucket. For example, `dist/` serves content from the `dist/` folder. Defaults to empty string (bucket root).
*/
readonly bucketPrefix: pulumi.Output<string>;
/**
* A custom domain in `static-website` mode attached to the service.
*/
readonly domainName: pulumi.Output<string>;
/**
* Enable or disable serving content on this domain. Defaults to true.
*/
readonly enabled: pulumi.Output<boolean>;
/**
* Custom error pages served when the storage backend returns an error status.
*/
readonly errorPages: pulumi.Output<outputs.ManagedObjectStorageStaticSiteErrorPage[]>;
/**
* Name of the index document. Defaults to `index.html`.
*/
readonly indexDocument: pulumi.Output<string>;
/**
* Managed Object Storage service UUID.
*/
readonly serviceUuid: pulumi.Output<string>;
/**
* Whether to enable single-page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing.
*/
readonly spaMode: pulumi.Output<boolean>;
/**
* Create a ManagedObjectStorageStaticSite 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: ManagedObjectStorageStaticSiteArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering ManagedObjectStorageStaticSite resources.
*/
export interface ManagedObjectStorageStaticSiteState {
/**
* S3 bucket from which static content is served. Must have a public read policy.
*/
bucketName?: pulumi.Input<string>;
/**
* Path prefix within the bucket. For example, `dist/` serves content from the `dist/` folder. Defaults to empty string (bucket root).
*/
bucketPrefix?: pulumi.Input<string>;
/**
* A custom domain in `static-website` mode attached to the service.
*/
domainName?: pulumi.Input<string>;
/**
* Enable or disable serving content on this domain. Defaults to true.
*/
enabled?: pulumi.Input<boolean>;
/**
* Custom error pages served when the storage backend returns an error status.
*/
errorPages?: pulumi.Input<pulumi.Input<inputs.ManagedObjectStorageStaticSiteErrorPage>[]>;
/**
* Name of the index document. Defaults to `index.html`.
*/
indexDocument?: pulumi.Input<string>;
/**
* Managed Object Storage service UUID.
*/
serviceUuid?: pulumi.Input<string>;
/**
* Whether to enable single-page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing.
*/
spaMode?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a ManagedObjectStorageStaticSite resource.
*/
export interface ManagedObjectStorageStaticSiteArgs {
/**
* S3 bucket from which static content is served. Must have a public read policy.
*/
bucketName: pulumi.Input<string>;
/**
* Path prefix within the bucket. For example, `dist/` serves content from the `dist/` folder. Defaults to empty string (bucket root).
*/
bucketPrefix?: pulumi.Input<string>;
/**
* A custom domain in `static-website` mode attached to the service.
*/
domainName?: pulumi.Input<string>;
/**
* Enable or disable serving content on this domain. Defaults to true.
*/
enabled?: pulumi.Input<boolean>;
/**
* Custom error pages served when the storage backend returns an error status.
*/
errorPages?: pulumi.Input<pulumi.Input<inputs.ManagedObjectStorageStaticSiteErrorPage>[]>;
/**
* Name of the index document. Defaults to `index.html`.
*/
indexDocument?: pulumi.Input<string>;
/**
* Managed Object Storage service UUID.
*/
serviceUuid: pulumi.Input<string>;
/**
* Whether to enable single-page application mode. In SPA mode, the index document is served for all paths, which is useful for client-side routing.
*/
spaMode?: pulumi.Input<boolean>;
}