@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
151 lines (150 loc) • 6.04 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* This resource is used for the ServiceStage service to establish the authorization relationship through personal access
* token with various types of the Open-Source repository.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const authorizationName = config.requireObject("authorizationName");
* const personalAccessToken = config.requireObject("personalAccessToken");
* const test = new huaweicloud.servicestage.RepoTokenAuthorization("test", {
* type: "github",
* token: personalAccessToken,
* });
* ```
*
* ## Import
*
* Authorizations can be imported using their `id` or `name`, e.g.bash
*
* ```sh
* $ pulumi import huaweicloud:ServiceStage/repoTokenAuthorization:RepoTokenAuthorization test terraform-test
* ```
*/
export declare class RepoTokenAuthorization extends pulumi.CustomResource {
/**
* Get an existing RepoTokenAuthorization 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?: RepoTokenAuthorizationState, opts?: pulumi.CustomResourceOptions): RepoTokenAuthorization;
/**
* Returns true if the given object is an instance of RepoTokenAuthorization. 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 RepoTokenAuthorization;
/**
* Specified the host name of the repository, e.g. **https://api.github.com**.
* Changing this parameter will create a new authorization.
* <!-- markdownlint-enable MD034 -->
*/
readonly host: pulumi.Output<string | undefined>;
/**
* Specified the authorization name.
* The name can contain of `4` to `63` characters, only letters, digits, underscores (_), hyphens (-) and dots (.) are
* allowed. Changing this parameter will create a new authorization.
*/
readonly name: pulumi.Output<string>;
/**
* Specified the region in which to create the repository authorization.
* If omitted, the provider-level region will be used. Changing this parameter will create a new authorization.
*/
readonly region: pulumi.Output<string>;
/**
* Specified the personal access token of the repository.
* Changing this parameter will create a new authorization.
*/
readonly token: pulumi.Output<string>;
/**
* Specified the repository type. The valid values are as follows:
* + **github**
* + **gitlab**
* + **gitee**
*/
readonly type: pulumi.Output<string>;
/**
* Create a RepoTokenAuthorization 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: RepoTokenAuthorizationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RepoTokenAuthorization resources.
*/
export interface RepoTokenAuthorizationState {
/**
* Specified the host name of the repository, e.g. **https://api.github.com**.
* Changing this parameter will create a new authorization.
* <!-- markdownlint-enable MD034 -->
*/
host?: pulumi.Input<string>;
/**
* Specified the authorization name.
* The name can contain of `4` to `63` characters, only letters, digits, underscores (_), hyphens (-) and dots (.) are
* allowed. Changing this parameter will create a new authorization.
*/
name?: pulumi.Input<string>;
/**
* Specified the region in which to create the repository authorization.
* If omitted, the provider-level region will be used. Changing this parameter will create a new authorization.
*/
region?: pulumi.Input<string>;
/**
* Specified the personal access token of the repository.
* Changing this parameter will create a new authorization.
*/
token?: pulumi.Input<string>;
/**
* Specified the repository type. The valid values are as follows:
* + **github**
* + **gitlab**
* + **gitee**
*/
type?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a RepoTokenAuthorization resource.
*/
export interface RepoTokenAuthorizationArgs {
/**
* Specified the host name of the repository, e.g. **https://api.github.com**.
* Changing this parameter will create a new authorization.
* <!-- markdownlint-enable MD034 -->
*/
host?: pulumi.Input<string>;
/**
* Specified the authorization name.
* The name can contain of `4` to `63` characters, only letters, digits, underscores (_), hyphens (-) and dots (.) are
* allowed. Changing this parameter will create a new authorization.
*/
name?: pulumi.Input<string>;
/**
* Specified the region in which to create the repository authorization.
* If omitted, the provider-level region will be used. Changing this parameter will create a new authorization.
*/
region?: pulumi.Input<string>;
/**
* Specified the personal access token of the repository.
* Changing this parameter will create a new authorization.
*/
token: pulumi.Input<string>;
/**
* Specified the repository type. The valid values are as follows:
* + **github**
* + **gitlab**
* + **gitee**
*/
type: pulumi.Input<string>;
}