-
Notifications
You must be signed in to change notification settings - Fork 224
Expand file tree
/
Copy pathDatabaseStaticRoleOptions.java
More file actions
78 lines (65 loc) · 2.68 KB
/
DatabaseStaticRoleOptions.java
File metadata and controls
78 lines (65 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package com.bettercloud.vault.api.database;
import java.util.ArrayList;
import java.util.List;
public class DatabaseStaticRoleOptions {
private String name;
private String dbName;
private String username;
private String rotationPeriod;
private List<String> rotationStatements = new ArrayList<>();
public String getName() {
return name;
}
public String getDbName() {
return dbName;
}
public String getUsername() {
return username;
}
public String getRotationPeriod() {
return rotationPeriod;
}
public List<String> getRotationStatements() {
return rotationStatements;
}
/**
* @param name {@code String} – Specifies the name of the role to create. This is specified as part of the URL.
* @return This object, with name populated, ready for other builder methods or immediate use.
*/
public DatabaseStaticRoleOptions name(final String name) {
this.name = name;
return this;
}
/**
* @param dbName {@code String} - The name of the database connection to use for this role.
* @return This object, with dbName populated, ready for other builder methods or immediate use.
*/
public DatabaseStaticRoleOptions dbName(final String dbName) {
this.dbName = dbName;
return this;
}
/**
* @param username {@code String} - The database usernameto use for this role.
* @return This object, with dbName populated, ready for other builder methods or immediate use.
*/
public DatabaseStaticRoleOptions username(final String username) {
this.username = username;
return this;
}
/**
* @param rotationPeriod (string/int: 0) - Specifies the amount of time Vault should wait before rotating the password. The minimum is 5 seconds.
* @return This object, with defaultTtl populated, ready for other builder methods or immediate use.
*/
public DatabaseStaticRoleOptions rotationPeriod(final String rotationPeriod) {
this.rotationPeriod = rotationPeriod;
return this;
}
/**
* @param rotationStatements {@code List<String>} – Specifies the database statements to be executed to rotate the password for the configured database user. Not every plugin type will support this functionality. See the plugin's API page for more information on support and formatting for this parameter.
* @return This object, with creationStatements populated, ready for other builder methods or immediate use.
*/
public DatabaseStaticRoleOptions rotationStatements(final List<String> rotationStatements) {
this.rotationStatements = rotationStatements;
return this;
}
}