@pulumi/yandex
Version:
A Pulumi package for creating and managing yandex cloud resources.
106 lines (105 loc) • 3.93 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import { input as inputs, output as outputs } from "./types";
/**
* Allows management of [Yandex.Cloud CDN Origin Groups](https://cloud.yandex.ru/docs/cdn/concepts/origins).
*
* > **_NOTE:_** CDN provider must be activated prior usage of CDN resources, either via UI console or via yc cli command: ```yc cdn provider activate --folder-id <folder-id> --type gcore```
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as yandex from "@pulumi/yandex";
*
* const myGroup = new yandex.CdnOriginGroup("my_group", {
* origins: [
* {
* source: "ya.ru",
* },
* {
* source: "yandex.ru",
* },
* {
* source: "goo.gl",
* },
* {
* backup: false,
* source: "amazon.com",
* },
* ],
* useNext: true,
* });
* ```
*
* ## Import
*
* A origin group can be imported using any of these accepted formats
*
* ```sh
* $ pulumi import yandex:index/cdnOriginGroup:CdnOriginGroup default origin_group_id
* ```
*/
export declare class CdnOriginGroup extends pulumi.CustomResource {
/**
* Get an existing CdnOriginGroup 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?: CdnOriginGroupState, opts?: pulumi.CustomResourceOptions): CdnOriginGroup;
/**
* Returns true if the given object is an instance of CdnOriginGroup. 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 CdnOriginGroup;
readonly folderId: pulumi.Output<string>;
/**
* CDN Origin Group name used to define device.
*/
readonly name: pulumi.Output<string>;
readonly origins: pulumi.Output<outputs.CdnOriginGroupOrigin[]>;
/**
* If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.
*/
readonly useNext: pulumi.Output<boolean | undefined>;
/**
* Create a CdnOriginGroup 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: CdnOriginGroupArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CdnOriginGroup resources.
*/
export interface CdnOriginGroupState {
folderId?: pulumi.Input<string>;
/**
* CDN Origin Group name used to define device.
*/
name?: pulumi.Input<string>;
origins?: pulumi.Input<pulumi.Input<inputs.CdnOriginGroupOrigin>[]>;
/**
* If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.
*/
useNext?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a CdnOriginGroup resource.
*/
export interface CdnOriginGroupArgs {
/**
* CDN Origin Group name used to define device.
*/
name?: pulumi.Input<string>;
origins: pulumi.Input<pulumi.Input<inputs.CdnOriginGroupOrigin>[]>;
/**
* If the option is active (has true value), in case the origin responds with 4XX or 5XX codes, use the next origin from the list.
*/
useNext?: pulumi.Input<boolean>;
}