com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnership Maven / Gradle / Ivy
Show all versions of cdktf-provider-snowflake Show documentation
package com.hashicorp.cdktf.providers.snowflake.grant_ownership;
/**
* Represents a {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/grant_ownership snowflake_grant_ownership}.
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.101.0 (build b95fe5d)", date = "2024-08-03T03:24:50.429Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = com.hashicorp.cdktf.providers.snowflake.$Module.class, fqn = "@cdktf/provider-snowflake.grantOwnership.GrantOwnership")
public class GrantOwnership extends com.hashicorp.cdktf.TerraformResource {
protected GrantOwnership(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected GrantOwnership(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
static {
TF_RESOURCE_TYPE = software.amazon.jsii.JsiiObject.jsiiStaticGet(com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnership.class, "tfResourceType", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
* Create a new {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/grant_ownership snowflake_grant_ownership} Resource.
*
* @param scope The scope in which to define this construct. This parameter is required.
* @param id The scoped construct ID. This parameter is required.
* @param config This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public GrantOwnership(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnershipConfig config) {
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(config, "config is required") });
}
/**
* Generates CDKTF code for importing a GrantOwnership resource upon running "cdktf plan ".
*
* @param scope The scope in which to define this construct. This parameter is required.
* @param importToId The construct id used in the generated config for the GrantOwnership to import. This parameter is required.
* @param importFromId The id of the existing GrantOwnership that should be imported. This parameter is required.
* @param provider ? Optional instance of the provider where the GrantOwnership to import is found.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.ImportableResource generateConfigForImport(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String importToId, final @org.jetbrains.annotations.NotNull java.lang.String importFromId, final @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.TerraformProvider provider) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnership.class, "generateConfigForImport", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.ImportableResource.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(importToId, "importToId is required"), java.util.Objects.requireNonNull(importFromId, "importFromId is required"), provider });
}
/**
* Generates CDKTF code for importing a GrantOwnership resource upon running "cdktf plan ".
*
* @param scope The scope in which to define this construct. This parameter is required.
* @param importToId The construct id used in the generated config for the GrantOwnership to import. This parameter is required.
* @param importFromId The id of the existing GrantOwnership that should be imported. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.ImportableResource generateConfigForImport(final @org.jetbrains.annotations.NotNull software.constructs.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String importToId, final @org.jetbrains.annotations.NotNull java.lang.String importFromId) {
return software.amazon.jsii.JsiiObject.jsiiStaticCall(com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnership.class, "generateConfigForImport", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.ImportableResource.class), new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(importToId, "importToId is required"), java.util.Objects.requireNonNull(importFromId, "importFromId is required") });
}
/**
* @param value This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void putOn(final @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnershipOn value) {
software.amazon.jsii.Kernel.call(this, "putOn", software.amazon.jsii.NativeType.VOID, new Object[] { java.util.Objects.requireNonNull(value, "value is required") });
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void resetAccountRoleName() {
software.amazon.jsii.Kernel.call(this, "resetAccountRoleName", software.amazon.jsii.NativeType.VOID);
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void resetDatabaseRoleName() {
software.amazon.jsii.Kernel.call(this, "resetDatabaseRoleName", software.amazon.jsii.NativeType.VOID);
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void resetId() {
software.amazon.jsii.Kernel.call(this, "resetId", software.amazon.jsii.NativeType.VOID);
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void resetOutboundPrivileges() {
software.amazon.jsii.Kernel.call(this, "resetOutboundPrivileges", software.amazon.jsii.NativeType.VOID);
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
protected @org.jetbrains.annotations.NotNull java.util.Map synthesizeAttributes() {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "synthesizeAttributes", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
protected @org.jetbrains.annotations.NotNull java.util.Map synthesizeHclAttributes() {
return java.util.Collections.unmodifiableMap(software.amazon.jsii.Kernel.call(this, "synthesizeHclAttributes", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public final static java.lang.String TF_RESOURCE_TYPE;
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnershipOnOutputReference getOn() {
return software.amazon.jsii.Kernel.get(this, "on", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnershipOnOutputReference.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getAccountRoleNameInput() {
return software.amazon.jsii.Kernel.get(this, "accountRoleNameInput", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getDatabaseRoleNameInput() {
return software.amazon.jsii.Kernel.get(this, "databaseRoleNameInput", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getIdInput() {
return software.amazon.jsii.Kernel.get(this, "idInput", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnershipOn getOnInput() {
return software.amazon.jsii.Kernel.get(this, "onInput", software.amazon.jsii.NativeType.forClass(com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnershipOn.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.Nullable java.lang.String getOutboundPrivilegesInput() {
return software.amazon.jsii.Kernel.get(this, "outboundPrivilegesInput", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getAccountRoleName() {
return software.amazon.jsii.Kernel.get(this, "accountRoleName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setAccountRoleName(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "accountRoleName", java.util.Objects.requireNonNull(value, "accountRoleName is required"));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getDatabaseRoleName() {
return software.amazon.jsii.Kernel.get(this, "databaseRoleName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setDatabaseRoleName(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "databaseRoleName", java.util.Objects.requireNonNull(value, "databaseRoleName is required"));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getId() {
return software.amazon.jsii.Kernel.get(this, "id", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setId(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "id", java.util.Objects.requireNonNull(value, "id is required"));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public @org.jetbrains.annotations.NotNull java.lang.String getOutboundPrivileges() {
return software.amazon.jsii.Kernel.get(this, "outboundPrivileges", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public void setOutboundPrivileges(final @org.jetbrains.annotations.NotNull java.lang.String value) {
software.amazon.jsii.Kernel.set(this, "outboundPrivileges", java.util.Objects.requireNonNull(value, "outboundPrivileges is required"));
}
/**
* A fluent builder for {@link com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnership}.
*/
@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 The scope in which to define this construct. This parameter is required.
* @param id The scoped construct ID. 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 com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnershipConfig.Builder config;
private Builder(final software.constructs.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.config = new com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnershipConfig.Builder();
}
/**
* @return {@code this}
* @param connection This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder connection(final com.hashicorp.cdktf.SSHProvisionerConnection connection) {
this.config.connection(connection);
return this;
}
/**
* @return {@code this}
* @param connection This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder connection(final com.hashicorp.cdktf.WinrmProvisionerConnection connection) {
this.config.connection(connection);
return this;
}
/**
* @return {@code this}
* @param count This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder count(final java.lang.Number count) {
this.config.count(count);
return this;
}
/**
* @return {@code this}
* @param count This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder count(final com.hashicorp.cdktf.TerraformCount count) {
this.config.count(count);
return this;
}
/**
* @return {@code this}
* @param dependsOn This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder dependsOn(final java.util.List dependsOn) {
this.config.dependsOn(dependsOn);
return this;
}
/**
* @return {@code this}
* @param forEach This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder forEach(final com.hashicorp.cdktf.ITerraformIterator forEach) {
this.config.forEach(forEach);
return this;
}
/**
* @return {@code this}
* @param lifecycle This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder lifecycle(final com.hashicorp.cdktf.TerraformResourceLifecycle lifecycle) {
this.config.lifecycle(lifecycle);
return this;
}
/**
* @return {@code this}
* @param provider This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder provider(final com.hashicorp.cdktf.TerraformProvider provider) {
this.config.provider(provider);
return this;
}
/**
* @return {@code this}
* @param provisioners This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder provisioners(final java.util.List provisioners) {
this.config.provisioners(provisioners);
return this;
}
/**
* on block.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/grant_ownership#on GrantOwnership#on}
*
* @return {@code this}
* @param on on block. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder on(final com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnershipOn on) {
this.config.on(on);
return this;
}
/**
* The fully qualified name of the account role to which privileges will be granted.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/grant_ownership#account_role_name GrantOwnership#account_role_name}
*
* @return {@code this}
* @param accountRoleName The fully qualified name of the account role to which privileges will be granted. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder accountRoleName(final java.lang.String accountRoleName) {
this.config.accountRoleName(accountRoleName);
return this;
}
/**
* The fully qualified name of the database role to which privileges will be granted.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/grant_ownership#database_role_name GrantOwnership#database_role_name}
*
* @return {@code this}
* @param databaseRoleName The fully qualified name of the database role to which privileges will be granted. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder databaseRoleName(final java.lang.String databaseRoleName) {
this.config.databaseRoleName(databaseRoleName);
return this;
}
/**
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/grant_ownership#id GrantOwnership#id}.
*
* Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2.
* If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable.
*
* @return {@code this}
* @param id Docs at Terraform Registry: {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/grant_ownership#id GrantOwnership#id}. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder id(final java.lang.String id) {
this.config.id(id);
return this;
}
/**
* Specifies whether to remove or transfer all existing outbound privileges on the object when ownership is transferred to a new role.
*
* Available options are: REVOKE for removing existing privileges and COPY to transfer them with ownership. For more information head over to [Snowflake documentation](https://docs.snowflake.com/en/sql-reference/sql/grant-ownership#optional-parameters).
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/snowflake-labs/snowflake/0.94.1/docs/resources/grant_ownership#outbound_privileges GrantOwnership#outbound_privileges}
*
* @return {@code this}
* @param outboundPrivileges Specifies whether to remove or transfer all existing outbound privileges on the object when ownership is transferred to a new role. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder outboundPrivileges(final java.lang.String outboundPrivileges) {
this.config.outboundPrivileges(outboundPrivileges);
return this;
}
/**
* @return a newly built instance of {@link com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnership}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@Override
public com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnership build() {
return new com.hashicorp.cdktf.providers.snowflake.grant_ownership.GrantOwnership(
this.scope,
this.id,
this.config.build()
);
}
}
}