Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.gitlab.UserImpersonationTokenArgs Maven / Gradle / Ivy
Go to download
A Pulumi package for creating and managing GitLab resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.gitlab;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
public final class UserImpersonationTokenArgs extends com.pulumi.resources.ResourceArgs {
public static final UserImpersonationTokenArgs Empty = new UserImpersonationTokenArgs();
/**
* Expiration date of the impersonation token in ISO format (YYYY-MM-DD).
*
*/
@Import(name="expiresAt", required=true)
private Output expiresAt;
/**
* @return Expiration date of the impersonation token in ISO format (YYYY-MM-DD).
*
*/
public Output expiresAt() {
return this.expiresAt;
}
/**
* The name of the impersonation token.
*
*/
@Import(name="name")
private @Nullable Output name;
/**
* @return The name of the impersonation token.
*
*/
public Optional> name() {
return Optional.ofNullable(this.name);
}
/**
* Array of scopes of the impersonation token. valid values are: `api`, `read_user`, `read_api`, `read_repository`, `write_repository`, `read_registry`, `write_registry`, `sudo`, `admin_mode`, `create_runner`, `manage_runner`, `ai_features`, `k8s_proxy`, `read_service_ping`
*
*/
@Import(name="scopes", required=true)
private Output> scopes;
/**
* @return Array of scopes of the impersonation token. valid values are: `api`, `read_user`, `read_api`, `read_repository`, `write_repository`, `read_registry`, `write_registry`, `sudo`, `admin_mode`, `create_runner`, `manage_runner`, `ai_features`, `k8s_proxy`, `read_service_ping`
*
*/
public Output> scopes() {
return this.scopes;
}
/**
* The ID of the user.
*
*/
@Import(name="userId", required=true)
private Output userId;
/**
* @return The ID of the user.
*
*/
public Output userId() {
return this.userId;
}
private UserImpersonationTokenArgs() {}
private UserImpersonationTokenArgs(UserImpersonationTokenArgs $) {
this.expiresAt = $.expiresAt;
this.name = $.name;
this.scopes = $.scopes;
this.userId = $.userId;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(UserImpersonationTokenArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private UserImpersonationTokenArgs $;
public Builder() {
$ = new UserImpersonationTokenArgs();
}
public Builder(UserImpersonationTokenArgs defaults) {
$ = new UserImpersonationTokenArgs(Objects.requireNonNull(defaults));
}
/**
* @param expiresAt Expiration date of the impersonation token in ISO format (YYYY-MM-DD).
*
* @return builder
*
*/
public Builder expiresAt(Output expiresAt) {
$.expiresAt = expiresAt;
return this;
}
/**
* @param expiresAt Expiration date of the impersonation token in ISO format (YYYY-MM-DD).
*
* @return builder
*
*/
public Builder expiresAt(String expiresAt) {
return expiresAt(Output.of(expiresAt));
}
/**
* @param name The name of the impersonation token.
*
* @return builder
*
*/
public Builder name(@Nullable Output name) {
$.name = name;
return this;
}
/**
* @param name The name of the impersonation token.
*
* @return builder
*
*/
public Builder name(String name) {
return name(Output.of(name));
}
/**
* @param scopes Array of scopes of the impersonation token. valid values are: `api`, `read_user`, `read_api`, `read_repository`, `write_repository`, `read_registry`, `write_registry`, `sudo`, `admin_mode`, `create_runner`, `manage_runner`, `ai_features`, `k8s_proxy`, `read_service_ping`
*
* @return builder
*
*/
public Builder scopes(Output> scopes) {
$.scopes = scopes;
return this;
}
/**
* @param scopes Array of scopes of the impersonation token. valid values are: `api`, `read_user`, `read_api`, `read_repository`, `write_repository`, `read_registry`, `write_registry`, `sudo`, `admin_mode`, `create_runner`, `manage_runner`, `ai_features`, `k8s_proxy`, `read_service_ping`
*
* @return builder
*
*/
public Builder scopes(List scopes) {
return scopes(Output.of(scopes));
}
/**
* @param scopes Array of scopes of the impersonation token. valid values are: `api`, `read_user`, `read_api`, `read_repository`, `write_repository`, `read_registry`, `write_registry`, `sudo`, `admin_mode`, `create_runner`, `manage_runner`, `ai_features`, `k8s_proxy`, `read_service_ping`
*
* @return builder
*
*/
public Builder scopes(String... scopes) {
return scopes(List.of(scopes));
}
/**
* @param userId The ID of the user.
*
* @return builder
*
*/
public Builder userId(Output userId) {
$.userId = userId;
return this;
}
/**
* @param userId The ID of the user.
*
* @return builder
*
*/
public Builder userId(Integer userId) {
return userId(Output.of(userId));
}
public UserImpersonationTokenArgs build() {
if ($.expiresAt == null) {
throw new MissingRequiredPropertyException("UserImpersonationTokenArgs", "expiresAt");
}
if ($.scopes == null) {
throw new MissingRequiredPropertyException("UserImpersonationTokenArgs", "scopes");
}
if ($.userId == null) {
throw new MissingRequiredPropertyException("UserImpersonationTokenArgs", "userId");
}
return $;
}
}
}