1. Packages
  2. Google Cloud Native
  3. API Docs
  4. alloydb
  5. alloydb/v1
  6. User

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

google-native.alloydb/v1.User

Explore with Pulumi AI

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi

Creates a new User in a given project, location, and cluster. Auto-naming is currently not supported for this resource.

Create User Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new User(name: string, args: UserArgs, opts?: CustomResourceOptions);
@overload
def User(resource_name: str,
         args: UserArgs,
         opts: Optional[ResourceOptions] = None)

@overload
def User(resource_name: str,
         opts: Optional[ResourceOptions] = None,
         cluster_id: Optional[str] = None,
         user_id: Optional[str] = None,
         database_roles: Optional[Sequence[str]] = None,
         location: Optional[str] = None,
         password: Optional[str] = None,
         project: Optional[str] = None,
         request_id: Optional[str] = None,
         user_type: Optional[UserUserType] = None)
func NewUser(ctx *Context, name string, args UserArgs, opts ...ResourceOption) (*User, error)
public User(string name, UserArgs args, CustomResourceOptions? opts = null)
public User(String name, UserArgs args)
public User(String name, UserArgs args, CustomResourceOptions options)
type: google-native:alloydb/v1:User
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. UserArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var userResource = new GoogleNative.AlloyDB.V1.User("userResource", new()
{
    ClusterId = "string",
    UserId = "string",
    DatabaseRoles = new[]
    {
        "string",
    },
    Location = "string",
    Password = "string",
    Project = "string",
    RequestId = "string",
    UserType = GoogleNative.AlloyDB.V1.UserUserType.UserTypeUnspecified,
});
Copy
example, err := alloydb.NewUser(ctx, "userResource", &alloydb.UserArgs{
	ClusterId: pulumi.String("string"),
	UserId:    pulumi.String("string"),
	DatabaseRoles: pulumi.StringArray{
		pulumi.String("string"),
	},
	Location:  pulumi.String("string"),
	Password:  pulumi.String("string"),
	Project:   pulumi.String("string"),
	RequestId: pulumi.String("string"),
	UserType:  alloydb.UserUserTypeUserTypeUnspecified,
})
Copy
var userResource = new User("userResource", UserArgs.builder()
    .clusterId("string")
    .userId("string")
    .databaseRoles("string")
    .location("string")
    .password("string")
    .project("string")
    .requestId("string")
    .userType("USER_TYPE_UNSPECIFIED")
    .build());
Copy
user_resource = google_native.alloydb.v1.User("userResource",
    cluster_id="string",
    user_id="string",
    database_roles=["string"],
    location="string",
    password="string",
    project="string",
    request_id="string",
    user_type=google_native.alloydb.v1.UserUserType.USER_TYPE_UNSPECIFIED)
Copy
const userResource = new google_native.alloydb.v1.User("userResource", {
    clusterId: "string",
    userId: "string",
    databaseRoles: ["string"],
    location: "string",
    password: "string",
    project: "string",
    requestId: "string",
    userType: google_native.alloydb.v1.UserUserType.UserTypeUnspecified,
});
Copy
type: google-native:alloydb/v1:User
properties:
    clusterId: string
    databaseRoles:
        - string
    location: string
    password: string
    project: string
    requestId: string
    userId: string
    userType: USER_TYPE_UNSPECIFIED
Copy

User Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The User resource accepts the following input properties:

ClusterId
This property is required.
Changes to this property will trigger replacement.
string
UserId
This property is required.
Changes to this property will trigger replacement.
string
Required. ID of the requesting object.
DatabaseRoles List<string>
Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
Location Changes to this property will trigger replacement. string
Password string
Input only. Password for the user.
Project Changes to this property will trigger replacement. string
RequestId string
Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
UserType Pulumi.GoogleNative.AlloyDB.V1.UserUserType
Optional. Type of this user.
ClusterId
This property is required.
Changes to this property will trigger replacement.
string
UserId
This property is required.
Changes to this property will trigger replacement.
string
Required. ID of the requesting object.
DatabaseRoles []string
Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
Location Changes to this property will trigger replacement. string
Password string
Input only. Password for the user.
Project Changes to this property will trigger replacement. string
RequestId string
Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
UserType UserUserType
Optional. Type of this user.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
userId
This property is required.
Changes to this property will trigger replacement.
String
Required. ID of the requesting object.
databaseRoles List<String>
Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
location Changes to this property will trigger replacement. String
password String
Input only. Password for the user.
project Changes to this property will trigger replacement. String
requestId String
Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
userType UserUserType
Optional. Type of this user.
clusterId
This property is required.
Changes to this property will trigger replacement.
string
userId
This property is required.
Changes to this property will trigger replacement.
string
Required. ID of the requesting object.
databaseRoles string[]
Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
location Changes to this property will trigger replacement. string
password string
Input only. Password for the user.
project Changes to this property will trigger replacement. string
requestId string
Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
userType UserUserType
Optional. Type of this user.
cluster_id
This property is required.
Changes to this property will trigger replacement.
str
user_id
This property is required.
Changes to this property will trigger replacement.
str
Required. ID of the requesting object.
database_roles Sequence[str]
Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
location Changes to this property will trigger replacement. str
password str
Input only. Password for the user.
project Changes to this property will trigger replacement. str
request_id str
Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
user_type UserUserType
Optional. Type of this user.
clusterId
This property is required.
Changes to this property will trigger replacement.
String
userId
This property is required.
Changes to this property will trigger replacement.
String
Required. ID of the requesting object.
databaseRoles List<String>
Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
location Changes to this property will trigger replacement. String
password String
Input only. Password for the user.
project Changes to this property will trigger replacement. String
requestId String
Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
userType "USER_TYPE_UNSPECIFIED" | "ALLOYDB_BUILT_IN" | "ALLOYDB_IAM_USER"
Optional. Type of this user.

Outputs

All input properties are implicitly available as output properties. Additionally, the User resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.
id string
The provider-assigned unique ID for this managed resource.
name string
Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.
id str
The provider-assigned unique ID for this managed resource.
name str
Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the resource in the form of projects/{project}/locations/{location}/cluster/{cluster}/users/{user}.

Supporting Types

UserUserType
, UserUserTypeArgs

UserTypeUnspecified
USER_TYPE_UNSPECIFIEDUnspecified user type.
AlloydbBuiltIn
ALLOYDB_BUILT_INThe default user type that authenticates via password-based authentication.
AlloydbIamUser
ALLOYDB_IAM_USERDatabase user that can authenticate via IAM-Based authentication.
UserUserTypeUserTypeUnspecified
USER_TYPE_UNSPECIFIEDUnspecified user type.
UserUserTypeAlloydbBuiltIn
ALLOYDB_BUILT_INThe default user type that authenticates via password-based authentication.
UserUserTypeAlloydbIamUser
ALLOYDB_IAM_USERDatabase user that can authenticate via IAM-Based authentication.
UserTypeUnspecified
USER_TYPE_UNSPECIFIEDUnspecified user type.
AlloydbBuiltIn
ALLOYDB_BUILT_INThe default user type that authenticates via password-based authentication.
AlloydbIamUser
ALLOYDB_IAM_USERDatabase user that can authenticate via IAM-Based authentication.
UserTypeUnspecified
USER_TYPE_UNSPECIFIEDUnspecified user type.
AlloydbBuiltIn
ALLOYDB_BUILT_INThe default user type that authenticates via password-based authentication.
AlloydbIamUser
ALLOYDB_IAM_USERDatabase user that can authenticate via IAM-Based authentication.
USER_TYPE_UNSPECIFIED
USER_TYPE_UNSPECIFIEDUnspecified user type.
ALLOYDB_BUILT_IN
ALLOYDB_BUILT_INThe default user type that authenticates via password-based authentication.
ALLOYDB_IAM_USER
ALLOYDB_IAM_USERDatabase user that can authenticate via IAM-Based authentication.
"USER_TYPE_UNSPECIFIED"
USER_TYPE_UNSPECIFIEDUnspecified user type.
"ALLOYDB_BUILT_IN"
ALLOYDB_BUILT_INThe default user type that authenticates via password-based authentication.
"ALLOYDB_IAM_USER"
ALLOYDB_IAM_USERDatabase user that can authenticate via IAM-Based authentication.

Package Details

Repository
Google Cloud Native pulumi/pulumi-google-native
License
Apache-2.0

Google Cloud Native is in preview. Google Cloud Classic is fully supported.

Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi