Skip to content

Commit 42492c9

Browse files
Google APIscopybara-github
authored andcommitted
fix!: Pagination feature is introduced for method ListKeyHandles in service Autokey
feat: Adding a state field for AutokeyConfig docs: Field service_resolvers in message .google.cloud.kms.v1.EkmConnection is Explicitly is marked as to have field behavior of Optional docs: A comment for field `destroy_scheduled_duration` in message `.google.cloud.kms.v1.CryptoKey` is updated for the default duration PiperOrigin-RevId: 676068244
1 parent 2d1f337 commit 42492c9

4 files changed

Lines changed: 47 additions & 5 deletions

File tree

google/cloud/kms/v1/autokey.proto

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ option java_multiple_files = true;
2727
option java_outer_classname = "AutokeyProto";
2828
option java_package = "com.google.cloud.kms.v1";
2929

30-
// Provides interfaces for using Cloud KMS Autokey to provision new
30+
// Provides interfaces for using [Cloud KMS
31+
// Autokey](https://cloud.google.com/kms/help/autokey) to provision new
3132
// [CryptoKeys][google.cloud.kms.v1.CryptoKey], ready for Customer Managed
3233
// Encryption Key (CMEK) use, on-demand. To support certain client tooling, this
3334
// feature is modeled around a [KeyHandle][google.cloud.kms.v1.KeyHandle]
@@ -180,6 +181,20 @@ message ListKeyHandlesRequest {
180181
}
181182
];
182183

184+
// Optional. Optional limit on the number of
185+
// [KeyHandles][google.cloud.kms.v1.KeyHandle] to include in the response. The
186+
// service may return fewer than this value. Further
187+
// [KeyHandles][google.cloud.kms.v1.KeyHandle] can subsequently be obtained by
188+
// including the
189+
// [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token]
190+
// in a subsequent request. If unspecified, at most
191+
// 100 [KeyHandles][google.cloud.kms.v1.KeyHandle] will be returned.
192+
int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
193+
194+
// Optional. Optional pagination token, returned earlier via
195+
// [ListKeyHandlesResponse.next_page_token][google.cloud.kms.v1.ListKeyHandlesResponse.next_page_token].
196+
string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
197+
183198
// Optional. Filter to apply when listing
184199
// [KeyHandles][google.cloud.kms.v1.KeyHandle], e.g.
185200
// `resource_type_selector="{SERVICE}.googleapis.com/{TYPE}"`.
@@ -191,4 +206,9 @@ message ListKeyHandlesRequest {
191206
message ListKeyHandlesResponse {
192207
// Resulting [KeyHandles][google.cloud.kms.v1.KeyHandle].
193208
repeated KeyHandle key_handles = 1;
209+
210+
// A token to retrieve next page of results. Pass this value in
211+
// [ListKeyHandlesRequest.page_token][google.cloud.kms.v1.ListKeyHandlesRequest.page_token]
212+
// to retrieve the next page of results.
213+
string next_page_token = 2;
194214
}

google/cloud/kms/v1/autokey_admin.proto

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ option java_multiple_files = true;
2727
option java_outer_classname = "AutokeyAdminProto";
2828
option java_package = "com.google.cloud.kms.v1";
2929

30-
// Provides interfaces for managing Cloud KMS Autokey folder-level
30+
// Provides interfaces for managing [Cloud KMS
31+
// Autokey](https://cloud.google.com/kms/help/autokey) folder-level
3132
// configurations. A configuration is inherited by all descendent projects. A
3233
// configuration at one folder overrides any other configurations in its
3334
// ancestry. Setting a configuration on a folder is a prerequisite for Cloud KMS
@@ -110,6 +111,23 @@ message AutokeyConfig {
110111
singular: "autokeyConfig"
111112
};
112113

114+
// The states AutokeyConfig can be in.
115+
enum State {
116+
// The state of the AutokeyConfig is unspecified.
117+
STATE_UNSPECIFIED = 0;
118+
119+
// The AutokeyConfig is currently active.
120+
ACTIVE = 1;
121+
122+
// A previously configured key project has been deleted and the current
123+
// AutokeyConfig is unusable.
124+
KEY_PROJECT_DELETED = 2;
125+
126+
// The AutokeyConfig is not yet initialized or has been reset to its default
127+
// uninitialized state.
128+
UNINITIALIZED = 3;
129+
}
130+
113131
// Identifier. Name of the [AutokeyConfig][google.cloud.kms.v1.AutokeyConfig]
114132
// resource, e.g. `folders/{FOLDER_NUMBER}/autokeyConfig`.
115133
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
@@ -126,6 +144,9 @@ message AutokeyConfig {
126144
// `cloudkms.admin` role (or pertinent permissions). A request with an empty
127145
// key project field will clear the configuration.
128146
string key_project = 2 [(google.api.field_behavior) = OPTIONAL];
147+
148+
// Output only. The state for the AutokeyConfig.
149+
State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
129150
}
130151

131152
// Request message for

google/cloud/kms/v1/ekm_service.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,14 @@ message EkmConnection {
378378
google.protobuf.Timestamp create_time = 2
379379
[(google.api.field_behavior) = OUTPUT_ONLY];
380380

381-
// A list of
381+
// Optional. A list of
382382
// [ServiceResolvers][google.cloud.kms.v1.EkmConnection.ServiceResolver] where
383383
// the EKM can be reached. There should be one ServiceResolver per EKM
384384
// replica. Currently, only a single
385385
// [ServiceResolver][google.cloud.kms.v1.EkmConnection.ServiceResolver] is
386386
// supported.
387-
repeated ServiceResolver service_resolvers = 3;
387+
repeated ServiceResolver service_resolvers = 3
388+
[(google.api.field_behavior) = OPTIONAL];
388389

389390
// Optional. Etag of the currently stored
390391
// [EkmConnection][google.cloud.kms.v1.EkmConnection].

google/cloud/kms/v1/resources.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ message CryptoKey {
184184
// [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED]
185185
// state before transitioning to
186186
// [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
187-
// If not specified at creation time, the default duration is 24 hours.
187+
// If not specified at creation time, the default duration is 30 days.
188188
google.protobuf.Duration destroy_scheduled_duration = 14
189189
[(google.api.field_behavior) = IMMUTABLE];
190190

0 commit comments

Comments
 (0)