@pulumi/ns1
Version:
A Pulumi package for creating and managing ns1 cloud resources.
222 lines (221 loc) • 8.87 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a NS1 Redirect resource. This can be used to create, modify, and delete redirects.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as ns1 from "@pulumi/ns1";
*
* const example = new ns1.Redirect("example", {
* domain: "www.example.com",
* path: "/from/path",
* target: "https://url.com/target/path",
* });
* ```
*
* ### Additional Examples
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as ns1 from "@pulumi/ns1";
*
* const example = new ns1.RedirectCertificate("example", {domain: "www.example.com"});
* ```
*
* ## NS1 Documentation
*
* [Redirect Api Doc](https://ns1.com/api#redirect)
*
* # ns1\_redirect\_certificate
*
* Provides a NS1 Redirect Certificate resource. This can be used to create, modify, and delete redirect certificates.
*
* ## NS1 Documentation
*
* [Redirect Api Doc](https://ns1.com/api#redirect)
*/
export declare class Redirect extends pulumi.CustomResource {
/**
* Get an existing Redirect 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?: RedirectState, opts?: pulumi.CustomResourceOptions): Redirect;
/**
* Returns true if the given object is an instance of Redirect. 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 Redirect;
readonly certificateId: pulumi.Output<string>;
/**
* The domain the redirect refers to.
*/
readonly domain: pulumi.Output<string>;
/**
* How the target is interpreted:
* * __all__ appends the entire incoming path to the target destination;
* * __capture__ appends only the part of the incoming path corresponding to the wildcard (*);
* * __none__ does not append any part of the incoming path.
*/
readonly forwardingMode: pulumi.Output<string | undefined>;
/**
* How the redirect is executed:
* * __permanent__ (HTTP 301) indicates to search engines that they should remove the old page from
* their database and replace it with the new target page (this is recommended for SEO);
* * __temporary__ (HTTP 302) less common, indicates that search engines should keep the old domain or
* page indexed as the redirect is only temporary (while both pages might appear in the
* search results, a temporary redirect suggests to the search engine that it should
* prefer the new target page);
* * __masking__ preserves the redirected domain in the browser's address bar (this lets users see the
* address they entered, even though the displayed content comes from a different web page).
*/
readonly forwardingType: pulumi.Output<string | undefined>;
/**
* True if HTTPS is supported on the source domain by using Let's Encrypt certificates.
*/
readonly httpsEnabled: pulumi.Output<boolean>;
/**
* Forces redirect for users that try to visit HTTP domain to HTTPS instead.
*/
readonly httpsForced: pulumi.Output<boolean>;
/**
* The Unix timestamp representing when the certificate was last signed.
*/
readonly lastUpdated: pulumi.Output<number>;
/**
* The path on the domain to redirect from.
*/
readonly path: pulumi.Output<string>;
/**
* Enables the query string of a URL to be applied directly to the new target URL.
*/
readonly queryForwarding: pulumi.Output<boolean | undefined>;
/**
* Tags associated with the configuration.
*/
readonly tags: pulumi.Output<string[] | undefined>;
/**
* The URL to redirect to.
*/
readonly target: pulumi.Output<string>;
/**
* Create a Redirect 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: RedirectArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Redirect resources.
*/
export interface RedirectState {
certificateId?: pulumi.Input<string>;
/**
* The domain the redirect refers to.
*/
domain?: pulumi.Input<string>;
/**
* How the target is interpreted:
* * __all__ appends the entire incoming path to the target destination;
* * __capture__ appends only the part of the incoming path corresponding to the wildcard (*);
* * __none__ does not append any part of the incoming path.
*/
forwardingMode?: pulumi.Input<string>;
/**
* How the redirect is executed:
* * __permanent__ (HTTP 301) indicates to search engines that they should remove the old page from
* their database and replace it with the new target page (this is recommended for SEO);
* * __temporary__ (HTTP 302) less common, indicates that search engines should keep the old domain or
* page indexed as the redirect is only temporary (while both pages might appear in the
* search results, a temporary redirect suggests to the search engine that it should
* prefer the new target page);
* * __masking__ preserves the redirected domain in the browser's address bar (this lets users see the
* address they entered, even though the displayed content comes from a different web page).
*/
forwardingType?: pulumi.Input<string>;
/**
* True if HTTPS is supported on the source domain by using Let's Encrypt certificates.
*/
httpsEnabled?: pulumi.Input<boolean>;
/**
* Forces redirect for users that try to visit HTTP domain to HTTPS instead.
*/
httpsForced?: pulumi.Input<boolean>;
/**
* The Unix timestamp representing when the certificate was last signed.
*/
lastUpdated?: pulumi.Input<number>;
/**
* The path on the domain to redirect from.
*/
path?: pulumi.Input<string>;
/**
* Enables the query string of a URL to be applied directly to the new target URL.
*/
queryForwarding?: pulumi.Input<boolean>;
/**
* Tags associated with the configuration.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The URL to redirect to.
*/
target?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Redirect resource.
*/
export interface RedirectArgs {
certificateId?: pulumi.Input<string>;
/**
* The domain the redirect refers to.
*/
domain: pulumi.Input<string>;
/**
* How the target is interpreted:
* * __all__ appends the entire incoming path to the target destination;
* * __capture__ appends only the part of the incoming path corresponding to the wildcard (*);
* * __none__ does not append any part of the incoming path.
*/
forwardingMode?: pulumi.Input<string>;
/**
* How the redirect is executed:
* * __permanent__ (HTTP 301) indicates to search engines that they should remove the old page from
* their database and replace it with the new target page (this is recommended for SEO);
* * __temporary__ (HTTP 302) less common, indicates that search engines should keep the old domain or
* page indexed as the redirect is only temporary (while both pages might appear in the
* search results, a temporary redirect suggests to the search engine that it should
* prefer the new target page);
* * __masking__ preserves the redirected domain in the browser's address bar (this lets users see the
* address they entered, even though the displayed content comes from a different web page).
*/
forwardingType?: pulumi.Input<string>;
/**
* Forces redirect for users that try to visit HTTP domain to HTTPS instead.
*/
httpsForced?: pulumi.Input<boolean>;
/**
* The path on the domain to redirect from.
*/
path: pulumi.Input<string>;
/**
* Enables the query string of a URL to be applied directly to the new target URL.
*/
queryForwarding?: pulumi.Input<boolean>;
/**
* Tags associated with the configuration.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* The URL to redirect to.
*/
target: pulumi.Input<string>;
}