@pulumiverse/harbor
Version:
A Pulumi package for creating and managing Harbor resources.
146 lines (145 loc) • 5.66 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* ## Example Usage
*
* ### System Level
* Introduced in harbor 2.2.0, system level robot accounts can have basically [all available permissions](https://github.com/goharbor/harbor/blob/-/src/common/rbac/const.go) in harbor and are not dependent on a single project.
*
* ### Global
*
* The above example, creates a system level robot account with permissions to
* - permission to create labels on system level
* - pull repository across all projects
* - push repository to project "my-project-name"
*
* ### Project
*
* Other than system level robot accounts, project level robot accounts can interact on project level only.
* The [available permissions](https://github.com/goharbor/harbor/blob/-/src/common/rbac/const.go) are mostly the same as for system level robots.
*
* The above example creates a project level robot account with permissions to
* - pull repository on project "main"
* - push repository on project "main"
*
* ## Import
*
* ```sh
* $ pulumi import harbor:index/robotAccount:RobotAccount system /robots/123
* ```
*/
export declare class RobotAccount extends pulumi.CustomResource {
/**
* Get an existing RobotAccount 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?: RobotAccountState, opts?: pulumi.CustomResourceOptions): RobotAccount;
/**
* Returns true if the given object is an instance of RobotAccount. 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 RobotAccount;
/**
* The description of the robot account will be displayed in harbor.
*/
readonly description: pulumi.Output<string | undefined>;
/**
* Disables the robot account when set to `true`.
*/
readonly disable: pulumi.Output<boolean | undefined>;
/**
* By default, the robot account will not expire. Set it to the amount of days until the account should expire.
*/
readonly duration: pulumi.Output<number | undefined>;
readonly fullName: pulumi.Output<string>;
/**
* Level of the robot account, currently either `system` or `project`.
*/
readonly level: pulumi.Output<string>;
/**
* The name of the project that will be created in harbor.
*/
readonly name: pulumi.Output<string>;
readonly permissions: pulumi.Output<outputs.RobotAccountPermission[]>;
readonly robotId: pulumi.Output<string>;
/**
* The secret of the robot account used for authentication. Defaults to random generated string from Harbor.
*/
readonly secret: pulumi.Output<string>;
/**
* Create a RobotAccount 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: RobotAccountArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering RobotAccount resources.
*/
export interface RobotAccountState {
/**
* The description of the robot account will be displayed in harbor.
*/
description?: pulumi.Input<string>;
/**
* Disables the robot account when set to `true`.
*/
disable?: pulumi.Input<boolean>;
/**
* By default, the robot account will not expire. Set it to the amount of days until the account should expire.
*/
duration?: pulumi.Input<number>;
fullName?: pulumi.Input<string>;
/**
* Level of the robot account, currently either `system` or `project`.
*/
level?: pulumi.Input<string>;
/**
* The name of the project that will be created in harbor.
*/
name?: pulumi.Input<string>;
permissions?: pulumi.Input<pulumi.Input<inputs.RobotAccountPermission>[]>;
robotId?: pulumi.Input<string>;
/**
* The secret of the robot account used for authentication. Defaults to random generated string from Harbor.
*/
secret?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a RobotAccount resource.
*/
export interface RobotAccountArgs {
/**
* The description of the robot account will be displayed in harbor.
*/
description?: pulumi.Input<string>;
/**
* Disables the robot account when set to `true`.
*/
disable?: pulumi.Input<boolean>;
/**
* By default, the robot account will not expire. Set it to the amount of days until the account should expire.
*/
duration?: pulumi.Input<number>;
/**
* Level of the robot account, currently either `system` or `project`.
*/
level: pulumi.Input<string>;
/**
* The name of the project that will be created in harbor.
*/
name?: pulumi.Input<string>;
permissions: pulumi.Input<pulumi.Input<inputs.RobotAccountPermission>[]>;
/**
* The secret of the robot account used for authentication. Defaults to random generated string from Harbor.
*/
secret?: pulumi.Input<string>;
}