@pulumiverse/harbor
Version:
A Pulumi package for creating and managing Harbor resources.
200 lines (199 loc) • 8.96 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* ## Example Usage
*
* ## Import
*
* ```sh
* $ pulumi import harbor:index/replication:Replication main /replication/policies/1
* ```
*/
export declare class Replication extends pulumi.CustomResource {
/**
* Get an existing Replication 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?: ReplicationState, opts?: pulumi.CustomResourceOptions): Replication;
/**
* Returns true if the given object is an instance of Replication. 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 Replication;
readonly action: pulumi.Output<string>;
/**
* Specify whether to enable the artifact blobs copied by chunks. (Default: `false`)
*/
readonly copyByChunk: pulumi.Output<boolean | undefined>;
/**
* Specify whether to delete the remote resources when locally deleted. (Default: `false`)
*/
readonly deletion: pulumi.Output<boolean | undefined>;
/**
* Description of the replication policy.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Specify the destination namespace. if empty, the resource will be put under the same namespace as the source.
*/
readonly destNamespace: pulumi.Output<string | undefined>;
/**
* Specify the destination namespace flattening policy. Integers from `-1` to `3` are valid values in the harbor API. A value of `-1` will 'Flatten All Levels', `0` means 'No Flattening', `1` 'Flatten 1 Level', `2` 'Flatten 2 Levels', `3` 'Flatten 3 Levels' (Default: `-1`, see [Replication Rules](https://goharbor.io/docs/latest/administration/configuring-replication/create-replication-rules/) for more details)
*/
readonly destNamespaceReplace: pulumi.Output<number | undefined>;
/**
* Specify whether the replication is enabled. (Default: `true`)
*/
readonly enabled: pulumi.Output<boolean | undefined>;
/**
* Specify whether to execute the replication rule if new or modified. (Default: `false`)
*/
readonly executeOnChanged: pulumi.Output<boolean | undefined>;
readonly filters: pulumi.Output<outputs.ReplicationFilter[] | undefined>;
/**
* The name of the replication.
*/
readonly name: pulumi.Output<string>;
/**
* Specify whether to override the resources at the destination if a resources with the same name exist. (Default: `true`)
*/
readonly override: pulumi.Output<boolean | undefined>;
/**
* The registry ID of the Registry Endpoint.
*/
readonly registryId: pulumi.Output<number>;
readonly replicationPolicyId: pulumi.Output<number>;
/**
* The scheduled time of when the container register will be push / pull. In cron base format. Hourly `"0 0 * * * *"`, Daily `"0 0 0 * * *"`, Monthly `"0 0 0 * * 0"`. Can be one of the following: `eventBased`, `manual`, `cron format` (Default: `manual`)
*/
readonly schedule: pulumi.Output<string | undefined>;
/**
* The Maximum network bandwidth in Kbps for each execution. Default is `-1` (unlimited).
*/
readonly speed: pulumi.Output<number | undefined>;
/**
* Create a Replication 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: ReplicationArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Replication resources.
*/
export interface ReplicationState {
action?: pulumi.Input<string>;
/**
* Specify whether to enable the artifact blobs copied by chunks. (Default: `false`)
*/
copyByChunk?: pulumi.Input<boolean>;
/**
* Specify whether to delete the remote resources when locally deleted. (Default: `false`)
*/
deletion?: pulumi.Input<boolean>;
/**
* Description of the replication policy.
*/
description?: pulumi.Input<string>;
/**
* Specify the destination namespace. if empty, the resource will be put under the same namespace as the source.
*/
destNamespace?: pulumi.Input<string>;
/**
* Specify the destination namespace flattening policy. Integers from `-1` to `3` are valid values in the harbor API. A value of `-1` will 'Flatten All Levels', `0` means 'No Flattening', `1` 'Flatten 1 Level', `2` 'Flatten 2 Levels', `3` 'Flatten 3 Levels' (Default: `-1`, see [Replication Rules](https://goharbor.io/docs/latest/administration/configuring-replication/create-replication-rules/) for more details)
*/
destNamespaceReplace?: pulumi.Input<number>;
/**
* Specify whether the replication is enabled. (Default: `true`)
*/
enabled?: pulumi.Input<boolean>;
/**
* Specify whether to execute the replication rule if new or modified. (Default: `false`)
*/
executeOnChanged?: pulumi.Input<boolean>;
filters?: pulumi.Input<pulumi.Input<inputs.ReplicationFilter>[]>;
/**
* The name of the replication.
*/
name?: pulumi.Input<string>;
/**
* Specify whether to override the resources at the destination if a resources with the same name exist. (Default: `true`)
*/
override?: pulumi.Input<boolean>;
/**
* The registry ID of the Registry Endpoint.
*/
registryId?: pulumi.Input<number>;
replicationPolicyId?: pulumi.Input<number>;
/**
* The scheduled time of when the container register will be push / pull. In cron base format. Hourly `"0 0 * * * *"`, Daily `"0 0 0 * * *"`, Monthly `"0 0 0 * * 0"`. Can be one of the following: `eventBased`, `manual`, `cron format` (Default: `manual`)
*/
schedule?: pulumi.Input<string>;
/**
* The Maximum network bandwidth in Kbps for each execution. Default is `-1` (unlimited).
*/
speed?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a Replication resource.
*/
export interface ReplicationArgs {
action: pulumi.Input<string>;
/**
* Specify whether to enable the artifact blobs copied by chunks. (Default: `false`)
*/
copyByChunk?: pulumi.Input<boolean>;
/**
* Specify whether to delete the remote resources when locally deleted. (Default: `false`)
*/
deletion?: pulumi.Input<boolean>;
/**
* Description of the replication policy.
*/
description?: pulumi.Input<string>;
/**
* Specify the destination namespace. if empty, the resource will be put under the same namespace as the source.
*/
destNamespace?: pulumi.Input<string>;
/**
* Specify the destination namespace flattening policy. Integers from `-1` to `3` are valid values in the harbor API. A value of `-1` will 'Flatten All Levels', `0` means 'No Flattening', `1` 'Flatten 1 Level', `2` 'Flatten 2 Levels', `3` 'Flatten 3 Levels' (Default: `-1`, see [Replication Rules](https://goharbor.io/docs/latest/administration/configuring-replication/create-replication-rules/) for more details)
*/
destNamespaceReplace?: pulumi.Input<number>;
/**
* Specify whether the replication is enabled. (Default: `true`)
*/
enabled?: pulumi.Input<boolean>;
/**
* Specify whether to execute the replication rule if new or modified. (Default: `false`)
*/
executeOnChanged?: pulumi.Input<boolean>;
filters?: pulumi.Input<pulumi.Input<inputs.ReplicationFilter>[]>;
/**
* The name of the replication.
*/
name?: pulumi.Input<string>;
/**
* Specify whether to override the resources at the destination if a resources with the same name exist. (Default: `true`)
*/
override?: pulumi.Input<boolean>;
/**
* The registry ID of the Registry Endpoint.
*/
registryId: pulumi.Input<number>;
/**
* The scheduled time of when the container register will be push / pull. In cron base format. Hourly `"0 0 * * * *"`, Daily `"0 0 0 * * *"`, Monthly `"0 0 0 * * 0"`. Can be one of the following: `eventBased`, `manual`, `cron format` (Default: `manual`)
*/
schedule?: pulumi.Input<string>;
/**
* The Maximum network bandwidth in Kbps for each execution. Default is `-1` (unlimited).
*/
speed?: pulumi.Input<number>;
}