This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.
published on Wednesday, Nov 29, 2023 by Pulumi
This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.
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)type: google-native:alloydb/v1beta:User
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "google-native_alloydb_v1beta_user" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UserArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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 exampleuserResourceResourceFromAlloydbv1beta = new GoogleNative.AlloyDB.V1Beta.User("exampleuserResourceResourceFromAlloydbv1beta", new()
{
ClusterId = "string",
UserId = "string",
DatabaseRoles = new[]
{
"string",
},
Location = "string",
Password = "string",
Project = "string",
RequestId = "string",
UserType = GoogleNative.AlloyDB.V1Beta.UserUserType.UserTypeUnspecified,
});
example, err := alloydbv1beta.NewUser(ctx, "exampleuserResourceResourceFromAlloydbv1beta", &alloydbv1beta.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: alloydbv1beta.UserUserTypeUserTypeUnspecified,
})
resource "google-native_alloydb_v1beta_user" "exampleuserResourceResourceFromAlloydbv1beta" {
lifecycle {
create_before_destroy = true
}
cluster_id = "string"
user_id = "string"
database_roles = ["string"]
location = "string"
password = "string"
project = "string"
request_id = "string"
user_type = "USER_TYPE_UNSPECIFIED"
}
var exampleuserResourceResourceFromAlloydbv1beta = new com.pulumi.googlenative.alloydb_v1beta.User("exampleuserResourceResourceFromAlloydbv1beta", com.pulumi.googlenative.alloydb_v1beta.UserArgs.builder()
.clusterId("string")
.userId("string")
.databaseRoles("string")
.location("string")
.password("string")
.project("string")
.requestId("string")
.userType(com.pulumi.googlenative.alloydb_v1beta.enums.UserUserType.UserTypeUnspecified)
.build());
exampleuser_resource_resource_from_alloydbv1beta = google_native.alloydb.v1beta.User("exampleuserResourceResourceFromAlloydbv1beta",
cluster_id="string",
user_id="string",
database_roles=["string"],
location="string",
password="string",
project="string",
request_id="string",
user_type=google_native.alloydb.v1beta.UserUserType.USER_TYPE_UNSPECIFIED)
const exampleuserResourceResourceFromAlloydbv1beta = new google_native.alloydb.v1beta.User("exampleuserResourceResourceFromAlloydbv1beta", {
clusterId: "string",
userId: "string",
databaseRoles: ["string"],
location: "string",
password: "string",
project: "string",
requestId: "string",
userType: google_native.alloydb.v1beta.UserUserType.UserTypeUnspecified,
});
type: google-native:alloydb/v1beta:User
properties:
clusterId: string
databaseRoles:
- string
location: string
password: string
project: string
requestId: string
userId: string
userType: USER_TYPE_UNSPECIFIED
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:
- Cluster
Id string - User
Id string - Required. ID of the requesting object.
- Database
Roles List<string> - Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
- Location string
- Password string
- Input only. Password for the user.
- Project string
- Request
Id 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).
- User
Type Pulumi.Google Native. Alloy DB. V1Beta. User User Type - Optional. Type of this user.
- Cluster
Id string - User
Id string - Required. ID of the requesting object.
- Database
Roles []string - Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
- Location string
- Password string
- Input only. Password for the user.
- Project string
- Request
Id 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).
- User
Type UserUser Type - Optional. Type of this user.
- cluster_
id string - user_
id string - Required. ID of the requesting object.
- database_
roles list(string) - Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
- location string
- password string
- Input only. Password for the user.
- project string
- request_
id 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).
- user_
type "USER_TYPE_UNSPECIFIED" | "ALLOYDB_BUILT_IN" | "ALLOYDB_IAM_USER" - Optional. Type of this user.
- cluster
Id String - user
Id String - Required. ID of the requesting object.
- database
Roles List<String> - Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
- location String
- password String
- Input only. Password for the user.
- project String
- request
Id 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).
- user
Type UserUser Type - Optional. Type of this user.
- cluster
Id string - user
Id string - Required. ID of the requesting object.
- database
Roles string[] - Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
- location string
- password string
- Input only. Password for the user.
- project string
- request
Id 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).
- user
Type UserUser Type - Optional. Type of this user.
- cluster_
id str - user_
id 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 str
- password str
- Input only. Password for the user.
- project 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 UserUser Type - Optional. Type of this user.
- cluster
Id String - user
Id String - Required. ID of the requesting object.
- database
Roles List<String> - Optional. List of database roles this user has. The database role strings are subject to the PostgreSQL naming conventions.
- location String
- password String
- Input only. Password for the user.
- project String
- request
Id 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).
- user
Type "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:
Look up Existing User Resource
Get an existing User resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, opts?: CustomResourceOptions): User@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None) -> Userfunc GetUser(ctx *Context, name string, id IDInput, state *UserState, opts ...ResourceOption) (*User, error)public static User Get(string name, Input<string> id, CustomResourceOptions? opts = null)public static User get(String name, Output<String> id, CustomResourceOptions options)resources: existingUser: type: google-native:alloydb/v1beta:User get: id: ${id}import {
to = google-native_alloydb_v1beta_user.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state UserState
- Pass nil. This resource has no state arguments.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Supporting Types
UserUserType
Optional. Type of this user.
| Name | Value | Description |
|---|---|---|
| User | USER_TYPE_UNSPECIFIED | Unspecified user type. |
| Alloydb | ALLOYDB_BUILT_IN | The default user type that authenticates via password-based authentication. |
| Alloydb | ALLOYDB_IAM_USER | Database user that can authenticate via IAM-Based authentication. |
| Name | Value | Description |
|---|---|---|
| User | USER_TYPE_UNSPECIFIED | Unspecified user type. |
| User | ALLOYDB_BUILT_IN | The default user type that authenticates via password-based authentication. |
| User | ALLOYDB_IAM_USER | Database user that can authenticate via IAM-Based authentication. |
| Value | Description |
|---|---|
USER_TYPE_UNSPECIFIED | Unspecified user type. |
ALLOYDB_BUILT_IN | The default user type that authenticates via password-based authentication. |
ALLOYDB_IAM_USER | Database user that can authenticate via IAM-Based authentication. |
| Name | Value | Description |
|---|---|---|
| User | USER_TYPE_UNSPECIFIED | Unspecified user type. |
| Alloydb | ALLOYDB_BUILT_IN | The default user type that authenticates via password-based authentication. |
| Alloydb | ALLOYDB_IAM_USER | Database user that can authenticate via IAM-Based authentication. |
| Name | Value | Description |
|---|---|---|
| User | USER_TYPE_UNSPECIFIED | Unspecified user type. |
| Alloydb | ALLOYDB_BUILT_IN | The default user type that authenticates via password-based authentication. |
| Alloydb | ALLOYDB_IAM_USER | Database user that can authenticate via IAM-Based authentication. |
| Name | Value | Description |
|---|---|---|
| USER_TYPE_UNSPECIFIED | USER_TYPE_UNSPECIFIED | Unspecified user type. |
| ALLOYDB_BUILT_IN | ALLOYDB_BUILT_IN | The default user type that authenticates via password-based authentication. |
| ALLOYDB_IAM_USER | ALLOYDB_IAM_USER | Database user that can authenticate via IAM-Based authentication. |
| Value | Description |
|---|---|
USER_TYPE_UNSPECIFIED | Unspecified user type. |
ALLOYDB_BUILT_IN | The default user type that authenticates via password-based authentication. |
ALLOYDB_IAM_USER | Database user that can authenticate via IAM-Based authentication. |
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
This package is deprecated. Active development has stopped. We recommend using the Google Cloud package instead.
published on Wednesday, Nov 29, 2023 by Pulumi