|
15 | 15 | */ |
16 | 16 |
|
17 | 17 | /* |
18 | | - * IBM OpenAPI SDK Code Generator Version: 3.60.0-13f6e1ba-20221019-164457 |
| 18 | + * IBM OpenAPI SDK Code Generator Version: 3.60.2-95dc7721-20221102-203229 |
19 | 19 | */ |
20 | 20 |
|
21 | 21 | // Package secretsmanagerv1 : Operations and models for the SecretsManagerV1 service |
@@ -6923,6 +6923,7 @@ func UnmarshalRotation(m map[string]json.RawMessage, result interface{}) (err er |
6923 | 6923 | // - RotateUsernamePasswordSecretBody |
6924 | 6924 | // - RotateCertificateBody |
6925 | 6925 | // - RotatePrivateCertBody |
| 6926 | +// - RotatePrivateCertBodyWithCsr |
6926 | 6927 | // - RotatePrivateCertBodyWithVersionCustomMetadata |
6927 | 6928 | // - RestoreIamCredentialsSecretBody |
6928 | 6929 | // - DeleteCredentialsForIamCredentialsSecret |
@@ -6952,6 +6953,12 @@ type SecretAction struct { |
6952 | 6953 | // The new intermediate certificate to associate with the certificate. |
6953 | 6954 | Intermediate *string `json:"intermediate,omitempty"` |
6954 | 6955 |
|
| 6956 | + // The certificate signing request. If you provide a CSR, it is used for auto rotation and manual rotation requests |
| 6957 | + // that do not include a CSR. If you don't include the CSR, the certificate is generated with the last CSR that you |
| 6958 | + // provided to create the private certificate, or on a previous request to rotate the certificate. If no CSR was |
| 6959 | + // provided in the past, the certificate is generated with a CSR that is created internally. |
| 6960 | + Csr *string `json:"csr,omitempty"` |
| 6961 | + |
6955 | 6962 | // The ID of the target version or the alias `previous`. |
6956 | 6963 | VersionID *string `json:"version_id,omitempty"` |
6957 | 6964 |
|
@@ -7010,6 +7017,10 @@ func UnmarshalSecretAction(m map[string]json.RawMessage, result interface{}) (er |
7010 | 7017 | if err != nil { |
7011 | 7018 | return |
7012 | 7019 | } |
| 7020 | + err = core.UnmarshalPrimitive(m, "csr", &obj.Csr) |
| 7021 | + if err != nil { |
| 7022 | + return |
| 7023 | + } |
7013 | 7024 | err = core.UnmarshalPrimitive(m, "version_id", &obj.VersionID) |
7014 | 7025 | if err != nil { |
7015 | 7026 | return |
@@ -8101,6 +8112,11 @@ type SecretResource struct { |
8101 | 8112 | // The intermediate certificate authority that signed this certificate. |
8102 | 8113 | CertificateAuthority *string `json:"certificate_authority,omitempty"` |
8103 | 8114 |
|
| 8115 | + // The certificate signing request. If you don't include this parameter, the CSR that is used to generate the |
| 8116 | + // certificate is created internally. If you provide a CSR, it is used also for auto rotation and manual rotation, |
| 8117 | + // unless you provide another CSR in the manual rotation request. |
| 8118 | + Csr *string `json:"csr,omitempty"` |
| 8119 | + |
8104 | 8120 | // The IP Subject Alternative Names to define for the CA certificate, in a comma-delimited list. |
8105 | 8121 | IPSans *string `json:"ip_sans,omitempty"` |
8106 | 8122 |
|
@@ -8366,6 +8382,10 @@ func UnmarshalSecretResource(m map[string]json.RawMessage, result interface{}) ( |
8366 | 8382 | if err != nil { |
8367 | 8383 | return |
8368 | 8384 | } |
| 8385 | + err = core.UnmarshalPrimitive(m, "csr", &obj.Csr) |
| 8386 | + if err != nil { |
| 8387 | + return |
| 8388 | + } |
8369 | 8389 | err = core.UnmarshalPrimitive(m, "ip_sans", &obj.IPSans) |
8370 | 8390 | if err != nil { |
8371 | 8391 | return |
@@ -13387,7 +13407,13 @@ type PrivateCertificateSecretResource struct { |
13387 | 13407 | // The intermediate certificate authority that signed this certificate. |
13388 | 13408 | CertificateAuthority *string `json:"certificate_authority,omitempty"` |
13389 | 13409 |
|
13390 | | - // The fully qualified domain name or host domain name for the certificate. |
| 13410 | + // The certificate signing request. If you don't include this parameter, the CSR that is used to generate the |
| 13411 | + // certificate is created internally. If you provide a CSR, it is used also for auto rotation and manual rotation, |
| 13412 | + // unless you provide another CSR in the manual rotation request. |
| 13413 | + Csr *string `json:"csr,omitempty"` |
| 13414 | + |
| 13415 | + // The fully qualified domain name or host domain name for the certificate. If you provide a CSR that includes a common |
| 13416 | + // name value, the certificate is generated with the common name that is provided in the CSR. |
13391 | 13417 | CommonName *string `json:"common_name" validate:"required"` |
13392 | 13418 |
|
13393 | 13419 | // The alternative names that are defined for the certificate. |
@@ -13455,7 +13481,8 @@ type PrivateCertificateSecretResource struct { |
13455 | 13481 | // The data that is associated with the secret. The data object contains the following fields: |
13456 | 13482 | // |
13457 | 13483 | // - `certificate`: The contents of the certificate. |
13458 | | - // - `private_key`: The private key that is associated with the certificate. |
| 13484 | + // - `private_key`: The private key that is associated with the certificate. If you provide a CSR in the request, the |
| 13485 | + // private_key field is not included in the data. |
13459 | 13486 | // - `issuing_ca`: The certificate of the certificate authority that signed and issued this certificate. |
13460 | 13487 | // - `ca_chain`: The chain of certificate authorities that are associated with the certificate. |
13461 | 13488 | SecretData map[string]interface{} `json:"secret_data,omitempty"` |
@@ -13581,6 +13608,10 @@ func UnmarshalPrivateCertificateSecretResource(m map[string]json.RawMessage, res |
13581 | 13608 | if err != nil { |
13582 | 13609 | return |
13583 | 13610 | } |
| 13611 | + err = core.UnmarshalPrimitive(m, "csr", &obj.Csr) |
| 13612 | + if err != nil { |
| 13613 | + return |
| 13614 | + } |
13584 | 13615 | err = core.UnmarshalPrimitive(m, "common_name", &obj.CommonName) |
13585 | 13616 | if err != nil { |
13586 | 13617 | return |
@@ -15231,6 +15262,54 @@ func UnmarshalRotatePrivateCertBody(m map[string]json.RawMessage, result interfa |
15231 | 15262 | return |
15232 | 15263 | } |
15233 | 15264 |
|
| 15265 | +// RotatePrivateCertBodyWithCsr : The body of a request to rotate a private certificate. |
| 15266 | +// This model "extends" SecretAction |
| 15267 | +type RotatePrivateCertBodyWithCsr struct { |
| 15268 | + // The certificate signing request. If you provide a CSR, it is used for auto rotation and manual rotation requests |
| 15269 | + // that do not include a CSR. If you don't include the CSR, the certificate is generated with the last CSR that you |
| 15270 | + // provided to create the private certificate, or on a previous request to rotate the certificate. If no CSR was |
| 15271 | + // provided in the past, the certificate is generated with a CSR that is created internally. |
| 15272 | + Csr *string `json:"csr" validate:"required"` |
| 15273 | + |
| 15274 | + // The secret metadata that a user can customize. |
| 15275 | + CustomMetadata map[string]interface{} `json:"custom_metadata,omitempty"` |
| 15276 | + |
| 15277 | + // The secret version metadata that a user can customize. |
| 15278 | + VersionCustomMetadata map[string]interface{} `json:"version_custom_metadata,omitempty"` |
| 15279 | +} |
| 15280 | + |
| 15281 | +// NewRotatePrivateCertBodyWithCsr : Instantiate RotatePrivateCertBodyWithCsr (Generic Model Constructor) |
| 15282 | +func (*SecretsManagerV1) NewRotatePrivateCertBodyWithCsr(csr string) (_model *RotatePrivateCertBodyWithCsr, err error) { |
| 15283 | + _model = &RotatePrivateCertBodyWithCsr{ |
| 15284 | + Csr: core.StringPtr(csr), |
| 15285 | + } |
| 15286 | + err = core.ValidateStruct(_model, "required parameters") |
| 15287 | + return |
| 15288 | +} |
| 15289 | + |
| 15290 | +func (*RotatePrivateCertBodyWithCsr) isaSecretAction() bool { |
| 15291 | + return true |
| 15292 | +} |
| 15293 | + |
| 15294 | +// UnmarshalRotatePrivateCertBodyWithCsr unmarshals an instance of RotatePrivateCertBodyWithCsr from the specified map of raw messages. |
| 15295 | +func UnmarshalRotatePrivateCertBodyWithCsr(m map[string]json.RawMessage, result interface{}) (err error) { |
| 15296 | + obj := new(RotatePrivateCertBodyWithCsr) |
| 15297 | + err = core.UnmarshalPrimitive(m, "csr", &obj.Csr) |
| 15298 | + if err != nil { |
| 15299 | + return |
| 15300 | + } |
| 15301 | + err = core.UnmarshalPrimitive(m, "custom_metadata", &obj.CustomMetadata) |
| 15302 | + if err != nil { |
| 15303 | + return |
| 15304 | + } |
| 15305 | + err = core.UnmarshalPrimitive(m, "version_custom_metadata", &obj.VersionCustomMetadata) |
| 15306 | + if err != nil { |
| 15307 | + return |
| 15308 | + } |
| 15309 | + reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) |
| 15310 | + return |
| 15311 | +} |
| 15312 | + |
15234 | 15313 | // RotatePrivateCertBodyWithVersionCustomMetadata : The request body of a rotate private certificate action. |
15235 | 15314 | // This model "extends" SecretAction |
15236 | 15315 | type RotatePrivateCertBodyWithVersionCustomMetadata struct { |
|
0 commit comments