@huaweicloudos/pulumi
Version:
A Pulumi package for creating and managing Huaweicloud cloud resources.
183 lines (182 loc) • 7.43 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Manages a SWR repository sharing resource within HuaweiCloud.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as pulumi from "@huaweicloudos/pulumi";
*
* const config = new pulumi.Config();
* const organizationName = config.requireObject("organizationName");
* const repositoryName = config.requireObject("repositoryName");
* const sharingAccount = config.requireObject("sharingAccount");
* const test = new huaweicloud.swr.RepositorySharing("test", {
* organization: organizationName,
* repository: repositoryName,
* sharingAccount: sharingAccount,
* permission: "pull",
* deadline: "forever",
* });
* ```
*
* ## Import
*
* Repository sharing can be imported using the organization name, repository name and sharing account separated by a slash, e.g.bash
*
* ```sh
* $ pulumi import huaweicloud:Swr/repositorySharing:RepositorySharing test org-name/repo-name/sharing-account
* ```
*/
export declare class RepositorySharing extends pulumi.CustomResource {
/**
* Get an existing RepositorySharing 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?: RepositorySharingState, opts?: pulumi.CustomResourceOptions): RepositorySharing;
/**
* Returns true if the given object is an instance of RepositorySharing. 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 RepositorySharing;
/**
* Specifies the end date of image sharing (UTC time in YYYY-MM-DD format,
* for example `2021-10-01`). When the value is set to forever, the image will be permanently available for the domain.
* The validity period is calculated by day. The shared images expire at 00:00:00 on the day after the end date.
*/
readonly deadline: pulumi.Output<string>;
/**
* Specifies the description of the repository sharing.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Specifies the name of the organization (namespace) the repository belongs.
* Changing this creates a new resource.
*/
readonly organization: pulumi.Output<string>;
/**
* Specifies the permission to be granted. Currently, only the **pull** permission is supported.
* Default value is **pull**.
*/
readonly permission: pulumi.Output<string | undefined>;
/**
* Specifies the region in which to create the resource. If omitted, the
* provider-level region will be used. Changing this creates a new resource.
*/
readonly region: pulumi.Output<string>;
/**
* Specifies the name of the repository to be shared.
* Changing this creates a new resource.
*/
readonly repository: pulumi.Output<string>;
/**
* Specifies the name of the account for repository sharing.
* Changing this creates a new resource
* > **NOTE:** `sharingAccount` should be an existing HuaweiCloud account.
*/
readonly sharingAccount: pulumi.Output<string>;
/**
* Indicates the repository sharing is valid (true) or expired (false).
*/
readonly status: pulumi.Output<boolean>;
/**
* Create a RepositorySharing 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: RepositorySharingArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RepositorySharing resources.
*/
export interface RepositorySharingState {
/**
* Specifies the end date of image sharing (UTC time in YYYY-MM-DD format,
* for example `2021-10-01`). When the value is set to forever, the image will be permanently available for the domain.
* The validity period is calculated by day. The shared images expire at 00:00:00 on the day after the end date.
*/
deadline?: pulumi.Input<string>;
/**
* Specifies the description of the repository sharing.
*/
description?: pulumi.Input<string>;
/**
* Specifies the name of the organization (namespace) the repository belongs.
* Changing this creates a new resource.
*/
organization?: pulumi.Input<string>;
/**
* Specifies the permission to be granted. Currently, only the **pull** permission is supported.
* Default value is **pull**.
*/
permission?: pulumi.Input<string>;
/**
* Specifies the region in which to create the resource. If omitted, the
* provider-level region will be used. Changing this creates a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the name of the repository to be shared.
* Changing this creates a new resource.
*/
repository?: pulumi.Input<string>;
/**
* Specifies the name of the account for repository sharing.
* Changing this creates a new resource
* > **NOTE:** `sharingAccount` should be an existing HuaweiCloud account.
*/
sharingAccount?: pulumi.Input<string>;
/**
* Indicates the repository sharing is valid (true) or expired (false).
*/
status?: pulumi.Input<boolean>;
}
/**
* The set of arguments for constructing a RepositorySharing resource.
*/
export interface RepositorySharingArgs {
/**
* Specifies the end date of image sharing (UTC time in YYYY-MM-DD format,
* for example `2021-10-01`). When the value is set to forever, the image will be permanently available for the domain.
* The validity period is calculated by day. The shared images expire at 00:00:00 on the day after the end date.
*/
deadline: pulumi.Input<string>;
/**
* Specifies the description of the repository sharing.
*/
description?: pulumi.Input<string>;
/**
* Specifies the name of the organization (namespace) the repository belongs.
* Changing this creates a new resource.
*/
organization: pulumi.Input<string>;
/**
* Specifies the permission to be granted. Currently, only the **pull** permission is supported.
* Default value is **pull**.
*/
permission?: pulumi.Input<string>;
/**
* Specifies the region in which to create the resource. If omitted, the
* provider-level region will be used. Changing this creates a new resource.
*/
region?: pulumi.Input<string>;
/**
* Specifies the name of the repository to be shared.
* Changing this creates a new resource.
*/
repository: pulumi.Input<string>;
/**
* Specifies the name of the account for repository sharing.
* Changing this creates a new resource
* > **NOTE:** `sharingAccount` should be an existing HuaweiCloud account.
*/
sharingAccount: pulumi.Input<string>;
}