org.mongodb.awscdk.resources.mongodbatlas.CfnApiKey Maven / Gradle / Ivy
Show all versions of awscdk-resources-mongodbatlas Show documentation
package org.mongodb.awscdk.resources.mongodbatlas;
/**
* A CloudFormation MongoDB::Atlas::APIKey
.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-07-30T09:54:28.894Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = org.mongodb.awscdk.resources.mongodbatlas.$Module.class, fqn = "awscdk-resources-mongodbatlas.CfnApiKey")
public class CfnApiKey extends software.amazon.awscdk.CfnResource {
protected CfnApiKey(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected CfnApiKey(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
CFN_RESOURCE_TYPE_NAME = software.amazon.jsii.JsiiObject.jsiiStaticGet(org.mongodb.awscdk.resources.mongodbatlas.CfnApiKey.class, "CFN_RESOURCE_TYPE_NAME", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Create a new MongoDB::Atlas::APIKey
.
*
* @param scope
- scope in which this resource is defined.
This parameter is required.
* @param id - scoped id of the resource.
This parameter is required.
* @param props - resource properties.
This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public CfnApiKey(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull org.mongodb.awscdk.resources.mongodbatlas.CfnApiKeyProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* The CloudFormation resource type name for this resource class.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static java.lang.String CFN_RESOURCE_TYPE_NAME;
/**
* Attribute MongoDB::Atlas::APIKey.APIUserId
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrAPIUserId() {
return software.amazon.jsii.Kernel.get(this, "attrAPIUserId", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Attribute MongoDB::Atlas::APIKey.PrivateKey
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrPrivateKey() {
return software.amazon.jsii.Kernel.get(this, "attrPrivateKey", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Attribute MongoDB::Atlas::APIKey.PublicKey
.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAttrPublicKey() {
return software.amazon.jsii.Kernel.get(this, "attrPublicKey", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Resource props.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull org.mongodb.awscdk.resources.mongodbatlas.CfnApiKeyProps getProps() {
return software.amazon.jsii.Kernel.get(this, "props", software.amazon.jsii.NativeType.forClass(org.mongodb.awscdk.resources.mongodbatlas.CfnApiKeyProps.class));
}
/**
* A fluent builder for {@link org.mongodb.awscdk.resources.mongodbatlas.CfnApiKey}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder implements software.amazon.jsii.Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope - scope in which this resource is defined.
This parameter is required.
* @param id - scoped id of the resource.
This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.constructs.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.constructs.Construct scope;
private final java.lang.String id;
private final org.mongodb.awscdk.resources.mongodbatlas.CfnApiKeyProps.Builder props;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new org.mongodb.awscdk.resources.mongodbatlas.CfnApiKeyProps.Builder();
}
/**
* Name of the AWS Secrets Manager secret that stores the API key Details.
*
* @return {@code this}
* @param awsSecretName Name of the AWS Secrets Manager secret that stores the API key Details. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder awsSecretName(final java.lang.String awsSecretName) {
this.props.awsSecretName(awsSecretName);
return this;
}
/**
* Purpose or explanation provided when someone created this organization API key.
*
* @return {@code this}
* @param description Purpose or explanation provided when someone created this organization API key. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder description(final java.lang.String description) {
this.props.description(description);
return this;
}
/**
* Unique 24-hexadecimal digit string that identifies the organization that contains your projects.
*
* Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
*
* @return {@code this}
* @param orgId Unique 24-hexadecimal digit string that identifies the organization that contains your projects. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder orgId(final java.lang.String orgId) {
this.props.orgId(orgId);
return this;
}
/**
* ARN of the AWS Secrets Manager secret that stores the API key Details.
*
* @return {@code this}
* @param awsSecretArn ARN of the AWS Secrets Manager secret that stores the API key Details. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder awsSecretArn(final java.lang.String awsSecretArn) {
this.props.awsSecretArn(awsSecretArn);
return this;
}
/**
* @return {@code this}
* @param listOptions This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder listOptions(final org.mongodb.awscdk.resources.mongodbatlas.ListOptions listOptions) {
this.props.listOptions(listOptions);
return this;
}
/**
* Profile used to provide credentials information, (a secret with the cfn/atlas/profile/{Profile}, is required), if not provided default is used.
*
* @return {@code this}
* @param profile Profile used to provide credentials information, (a secret with the cfn/atlas/profile/{Profile}, is required), if not provided default is used. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder profile(final java.lang.String profile) {
this.props.profile(profile);
return this;
}
/**
* @return {@code this}
* @param projectAssignments This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder projectAssignments(final java.util.List extends org.mongodb.awscdk.resources.mongodbatlas.ProjectAssignment> projectAssignments) {
this.props.projectAssignments(projectAssignments);
return this;
}
/**
* List of roles to grant this API key.
*
* If you provide this list, provide a minimum of one role and ensure each role applies to this organization.
*
* @return {@code this}
* @param roles List of roles to grant this API key. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder roles(final java.util.List roles) {
this.props.roles(roles);
return this;
}
/**
* @return a newly built instance of {@link org.mongodb.awscdk.resources.mongodbatlas.CfnApiKey}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public org.mongodb.awscdk.resources.mongodbatlas.CfnApiKey build() {
return new org.mongodb.awscdk.resources.mongodbatlas.CfnApiKey(
this.scope,
this.id,
this.props.build()
);
}
}
}