Skip to content

Commit

Permalink
chore(docs): update documentation for #403
Browse files Browse the repository at this point in the history
  • Loading branch information
villevsv-upcloud authored and github-actions[bot] committed Sep 28, 2023
1 parent a456582 commit b02283c
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 0 deletions.
63 changes: 63 additions & 0 deletions docs/data-sources/managed_database_mysql_sessions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "upcloud_managed_database_mysql_sessions Data Source - terraform-provider-upcloud"
subcategory: ""
description: |-
Current sessions of a MySQL managed database
---

# upcloud_managed_database_mysql_sessions (Data Source)

Current sessions of a MySQL managed database

## Example Usage

```terraform
# Use data source to gather a list of the active sessions for a Managed MySQL Database
# Create a Managed MySQL resource
resource "upcloud_managed_database_mysql" "example" {
name = "mysql-example1"
plan = "1x1xCPU-2GB-25GB"
zone = "fi-hel1"
}
# Read the active sessions of the newly created service
data "upcloud_managed_database_mysql_sessions" "example" {
service = upcloud_managed_database_mysql.example.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `service` (String) Service's UUID for which these sessions belongs to

### Optional

- `limit` (Number) Number of entries to receive at most.
- `offset` (Number) Offset for retrieved results based on sort order.
- `order` (String) Order by session field and sort retrieved results. Limited variables can be used for ordering.

### Read-Only

- `id` (String) The ID of this resource.
- `sessions` (Block Set) Current sessions (see [below for nested schema](#nestedblock--sessions))

<a id="nestedblock--sessions"></a>
### Nested Schema for `sessions`

Read-Only:

- `application_name` (String) Name of the application that is connected to this service.
- `client_addr` (String) IP address of the client connected to this service.
- `datname` (String) Name of the database this service is connected to.
- `id` (String) Process ID of this service.
- `query` (String) Text of this service's most recent query. If state is active this field shows the currently executing query. In all other states, it shows an empty string.
- `query_duration` (String) The active query current duration.
- `state` (String) Current overall state of this service: active: The service is executing a query, idle: The service is waiting for a new client command.
- `usename` (String) Name of the user logged into this service.


79 changes: 79 additions & 0 deletions docs/data-sources/managed_database_postgresql_sessions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "upcloud_managed_database_postgresql_sessions Data Source - terraform-provider-upcloud"
subcategory: ""
description: |-
Current sessions of a PostgreSQL managed database
---

# upcloud_managed_database_postgresql_sessions (Data Source)

Current sessions of a PostgreSQL managed database

## Example Usage

```terraform
# Use data source to gather a list of the active sessions for a Managed PostgreSQL Database
# Create a Managed PostgreSQL resource
resource "upcloud_managed_database_postgresql" "example" {
name = "mysql-example1"
plan = "1x1xCPU-2GB-25GB"
zone = "fi-hel1"
}
# Read the active sessions of the newly created service
data "upcloud_managed_database_postgresql_sessions" "example" {
service = upcloud_managed_database_postgresql.example.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `service` (String) Service's UUID for which these sessions belongs to

### Optional

- `limit` (Number) Number of entries to receive at most.
- `offset` (Number) Offset for retrieved results based on sort order.
- `order` (String) Order by session field and sort retrieved results. Limited variables can be used for ordering.
- `sessions` (Block Set) Current sessions (see [below for nested schema](#nestedblock--sessions))

### Read-Only

- `id` (String) The ID of this resource.

<a id="nestedblock--sessions"></a>
### Nested Schema for `sessions`

Optional:

- `backend_xid` (Number) Top-level transaction identifier of this service, if any.
- `backend_xmin` (Number) The current service's xmin horizon.
- `client_hostname` (String) Host name of the connected client, as reported by a reverse DNS lookup of `client_addr`.
- `xact_start` (String) Time when this process' current transaction was started, or null if no transaction is active.

Read-Only:

- `application_name` (String) Name of the application that is connected to this service.
- `backend_start` (String) Time when this process was started, i.e., when the client connected to the server.
- `backend_type` (String) Type of current service.
- `client_addr` (String) IP address of the client connected to this service. If this field is null, it indicates either that the client is connected via a Unix socket on the server machine or that this is an internal process such as autovacuum.
- `client_port` (Number) TCP port number that the client is using for communication with this service, or -1 if a Unix socket is used.
- `datid` (Number) OID of the database this service is connected to.
- `datname` (String) Name of the database this service is connected to.
- `id` (String) Process ID of this service.
- `query` (String) Text of this service's most recent query. If state is active this field shows the currently executing query. In all other states, it shows the last query that was executed.
- `query_duration` (String) The active query current duration.
- `query_start` (String) Time when the currently active query was started, or if state is not active, when the last query was started.
- `state` (String) Current overall state of this service: active: The service is executing a query, idle: The service is waiting for a new client command.
- `state_change` (String) Time when the state was last changed.
- `usename` (String) Name of the user logged into this service.
- `usesysid` (Number) OID of the user logged into this service.
- `wait_event` (String) Wait event name if service is currently waiting.
- `wait_event_type` (String) The type of event for which the service is waiting, if any; otherwise NULL.


72 changes: 72 additions & 0 deletions docs/data-sources/managed_database_redis_sessions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "upcloud_managed_database_redis_sessions Data Source - terraform-provider-upcloud"
subcategory: ""
description: |-
Current sessions of a Redis managed database
---

# upcloud_managed_database_redis_sessions (Data Source)

Current sessions of a Redis managed database

## Example Usage

```terraform
# Use data source to gather a list of the active sessions for a Managed Redis Database
# Create a Managed Redis resource
resource "upcloud_managed_database_redis" "example" {
name = "example"
plan = "1x1xCPU-2GB"
zone = "fi-hel2"
}
# Read the active sessions of the newly created service
data "upcloud_managed_database_redis_sessions" "example" {
service = upcloud_managed_database_redis.example.id
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `service` (String) Service's UUID for which these sessions belongs to

### Optional

- `limit` (Number) Number of entries to receive at most.
- `offset` (Number) Offset for retrieved results based on sort order.
- `order` (String) Order by session field and sort retrieved results. Limited variables can be used for ordering.

### Read-Only

- `id` (String) The ID of this resource.
- `sessions` (Block Set) Current sessions (see [below for nested schema](#nestedblock--sessions))

<a id="nestedblock--sessions"></a>
### Nested Schema for `sessions`

Read-Only:

- `active_channel_subscriptions` (Number) Number of active channel subscriptions
- `active_database` (String) Current database ID
- `active_pattern_matching_channel_subscriptions` (Number) Number of pattern matching subscriptions.
- `application_name` (String) Name of the application that is connected to this service.
- `client_addr` (String) Number of pattern matching subscriptions.
- `connection_age` (Number) Total duration of the connection in nanoseconds.
- `connection_idle` (Number) Idle time of the connection in nanoseconds.
- `flags` (Set of String) A set containing flags' descriptions.
- `flags_raw` (String) Client connection flags in raw string format.
- `id` (String) Process ID of this session.
- `multi_exec_commands` (Number) Number of commands in a MULTI/EXEC context.
- `output_buffer` (Number) Output buffer length.
- `output_buffer_memory` (Number) Output buffer memory usage.
- `output_list_length` (Number) Output list length (replies are queued in this list when the buffer is full).
- `query` (String) The last executed command.
- `query_buffer` (Number) Query buffer length (0 means no query pending).
- `query_buffer_free` (Number) Free space of the query buffer (0 means the buffer is full).


0 comments on commit b02283c

Please sign in to comment.