com.pulumi.aws.grafana.WorkspaceApiKeyArgs Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aws Show documentation
Show all versions of aws Show documentation
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud 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.aws.grafana;
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.Objects;
public final class WorkspaceApiKeyArgs extends com.pulumi.resources.ResourceArgs {
public static final WorkspaceApiKeyArgs Empty = new WorkspaceApiKeyArgs();
/**
* Specifies the name of the API key. Key names must be unique to the workspace.
*
*/
@Import(name="keyName", required=true)
private Output keyName;
/**
* @return Specifies the name of the API key. Key names must be unique to the workspace.
*
*/
public Output keyName() {
return this.keyName;
}
/**
* Specifies the permission level of the API key. Valid values are `VIEWER`, `EDITOR`, or `ADMIN`.
*
*/
@Import(name="keyRole", required=true)
private Output keyRole;
/**
* @return Specifies the permission level of the API key. Valid values are `VIEWER`, `EDITOR`, or `ADMIN`.
*
*/
public Output keyRole() {
return this.keyRole;
}
/**
* Specifies the time in seconds until the API key expires. Keys can be valid for up to 30 days.
*
*/
@Import(name="secondsToLive", required=true)
private Output secondsToLive;
/**
* @return Specifies the time in seconds until the API key expires. Keys can be valid for up to 30 days.
*
*/
public Output secondsToLive() {
return this.secondsToLive;
}
/**
* The ID of the workspace that the API key is valid for.
*
*/
@Import(name="workspaceId", required=true)
private Output workspaceId;
/**
* @return The ID of the workspace that the API key is valid for.
*
*/
public Output workspaceId() {
return this.workspaceId;
}
private WorkspaceApiKeyArgs() {}
private WorkspaceApiKeyArgs(WorkspaceApiKeyArgs $) {
this.keyName = $.keyName;
this.keyRole = $.keyRole;
this.secondsToLive = $.secondsToLive;
this.workspaceId = $.workspaceId;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(WorkspaceApiKeyArgs defaults) {
return new Builder(defaults);
}
public static final class Builder {
private WorkspaceApiKeyArgs $;
public Builder() {
$ = new WorkspaceApiKeyArgs();
}
public Builder(WorkspaceApiKeyArgs defaults) {
$ = new WorkspaceApiKeyArgs(Objects.requireNonNull(defaults));
}
/**
* @param keyName Specifies the name of the API key. Key names must be unique to the workspace.
*
* @return builder
*
*/
public Builder keyName(Output keyName) {
$.keyName = keyName;
return this;
}
/**
* @param keyName Specifies the name of the API key. Key names must be unique to the workspace.
*
* @return builder
*
*/
public Builder keyName(String keyName) {
return keyName(Output.of(keyName));
}
/**
* @param keyRole Specifies the permission level of the API key. Valid values are `VIEWER`, `EDITOR`, or `ADMIN`.
*
* @return builder
*
*/
public Builder keyRole(Output keyRole) {
$.keyRole = keyRole;
return this;
}
/**
* @param keyRole Specifies the permission level of the API key. Valid values are `VIEWER`, `EDITOR`, or `ADMIN`.
*
* @return builder
*
*/
public Builder keyRole(String keyRole) {
return keyRole(Output.of(keyRole));
}
/**
* @param secondsToLive Specifies the time in seconds until the API key expires. Keys can be valid for up to 30 days.
*
* @return builder
*
*/
public Builder secondsToLive(Output secondsToLive) {
$.secondsToLive = secondsToLive;
return this;
}
/**
* @param secondsToLive Specifies the time in seconds until the API key expires. Keys can be valid for up to 30 days.
*
* @return builder
*
*/
public Builder secondsToLive(Integer secondsToLive) {
return secondsToLive(Output.of(secondsToLive));
}
/**
* @param workspaceId The ID of the workspace that the API key is valid for.
*
* @return builder
*
*/
public Builder workspaceId(Output workspaceId) {
$.workspaceId = workspaceId;
return this;
}
/**
* @param workspaceId The ID of the workspace that the API key is valid for.
*
* @return builder
*
*/
public Builder workspaceId(String workspaceId) {
return workspaceId(Output.of(workspaceId));
}
public WorkspaceApiKeyArgs build() {
if ($.keyName == null) {
throw new MissingRequiredPropertyException("WorkspaceApiKeyArgs", "keyName");
}
if ($.keyRole == null) {
throw new MissingRequiredPropertyException("WorkspaceApiKeyArgs", "keyRole");
}
if ($.secondsToLive == null) {
throw new MissingRequiredPropertyException("WorkspaceApiKeyArgs", "secondsToLive");
}
if ($.workspaceId == null) {
throw new MissingRequiredPropertyException("WorkspaceApiKeyArgs", "workspaceId");
}
return $;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy