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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct PutParameterInput {
/// <p>The fully qualified name of the parameter that you want to add to the system. The fully qualified name includes the complete hierarchy of the parameter path and name. For parameters in a hierarchy, you must include a leading forward slash character (/) when you create or reference a parameter. For example: <code>/Dev/DBServer/MySQL/db-string13</code></p>
/// <p>Naming Constraints:</p>
/// <ul>
/// <li>
/// <p>Parameter names are case sensitive.</p></li>
/// <li>
/// <p>A parameter name must be unique within an Amazon Web Services Region</p></li>
/// <li>
/// <p>A parameter name can't be prefixed with "<code>aws</code>" or "<code>ssm</code>" (case-insensitive).</p></li>
/// <li>
/// <p>Parameter names can include only the following symbols and letters: <code>a-zA-Z0-9_.-</code></p>
/// <p>In addition, the slash character ( / ) is used to delineate hierarchies in parameter names. For example: <code>/Dev/Production/East/Project-ABC/MyParameter</code></p></li>
/// <li>
/// <p>A parameter name can't include spaces.</p></li>
/// <li>
/// <p>Parameter hierarchies are limited to a maximum depth of fifteen levels.</p></li>
/// </ul>
/// <p>For additional information about valid values for parameter names, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html">Creating Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
/// <p>The maximum length constraint of 2048 characters listed below includes 1037 characters reserved for internal use by Systems Manager. The maximum length for a parameter name that you create is 1011 characters. This includes the characters in the ARN that precede the name you specify, such as <code>arn:aws:ssm:us-east-2:111122223333:parameter/</code>.</p>
/// </note>
pub name: ::std::option::Option<::std::string::String>,
/// <p>Information about the parameter that you want to add to the system. Optional but recommended.</p><important>
/// <p>Don't enter personally identifiable information in this field.</p>
/// </important>
pub description: ::std::option::Option<::std::string::String>,
/// <p>The parameter value that you want to add to the system. Standard parameters have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB.</p><note>
/// <p>Parameters can't be referenced or nested in the values of other parameters. You can't include <code>{{}}</code> or <code>{{ssm:<i>parameter-name</i>}}</code> in a parameter value.</p>
/// </note>
pub value: ::std::option::Option<::std::string::String>,
/// <p>The type of parameter that you want to add to the system.</p><note>
/// <p><code>SecureString</code> isn't currently supported for CloudFormation templates.</p>
/// </note>
/// <p>Items in a <code>StringList</code> must be separated by a comma (,). You can't use other punctuation or special character to escape items in the list. If you have a parameter value that requires a comma, then use the <code>String</code> data type.</p><important>
/// <p>Specifying a parameter type isn't required when updating a parameter. You must specify a parameter type when creating a parameter.</p>
/// </important>
pub r#type: ::std::option::Option<crate::types::ParameterType>,
/// <p>The Key Management Service (KMS) ID that you want to use to encrypt a parameter. Use a custom key for better security. Required for parameters that use the <code>SecureString</code> data type.</p>
/// <p>If you don't specify a key ID, the system uses the default key associated with your Amazon Web Services account which is not as secure as using a custom key.</p>
/// <ul>
/// <li>
/// <p>To use a custom KMS key, choose the <code>SecureString</code> data type with the <code>Key ID</code> parameter.</p></li>
/// </ul>
pub key_id: ::std::option::Option<::std::string::String>,
/// <p>Overwrite an existing parameter. The default value is <code>false</code>.</p>
pub overwrite: ::std::option::Option<bool>,
/// <p>A regular expression used to validate the parameter value. For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$</p>
pub allowed_pattern: ::std::option::Option<::std::string::String>,
/// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key-value pairs:</p>
/// <ul>
/// <li>
/// <p><code>Key=Resource,Value=S3bucket</code></p></li>
/// <li>
/// <p><code>Key=OS,Value=Windows</code></p></li>
/// <li>
/// <p><code>Key=ParameterType,Value=LicenseKey</code></p></li>
/// </ul><note>
/// <p>To add tags to an existing Systems Manager parameter, use the <code>AddTagsToResource</code> operation.</p>
/// </note>
pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
/// <p>The parameter tier to assign to a parameter.</p>
/// <p>Parameter Store offers a standard tier and an advanced tier for parameters. Standard parameters have a content size limit of 4 KB and can't be configured to use parameter policies. You can create a maximum of 10,000 standard parameters for each Region in an Amazon Web Services account. Standard parameters are offered at no additional cost.</p>
/// <p>Advanced parameters have a content size limit of 8 KB and can be configured to use parameter policies. You can create a maximum of 100,000 advanced parameters for each Region in an Amazon Web Services account. Advanced parameters incur a charge. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html">Standard and advanced parameter tiers</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
/// <p>You can change a standard parameter to an advanced parameter any time. But you can't revert an advanced parameter to a standard parameter. Reverting an advanced parameter to a standard parameter would result in data loss because the system would truncate the size of the parameter from 8 KB to 4 KB. Reverting would also remove any policies attached to the parameter. Lastly, advanced parameters use a different form of encryption than standard parameters.</p>
/// <p>If you no longer need an advanced parameter, or if you no longer want to incur charges for an advanced parameter, you must delete it and recreate it as a new standard parameter.</p>
/// <p><b>Using the Default Tier Configuration</b></p>
/// <p>In <code>PutParameter</code> requests, you can specify the tier to create the parameter in. Whenever you specify a tier in the request, Parameter Store creates or updates the parameter according to that request. However, if you don't specify a tier in a request, Parameter Store assigns the tier based on the current Parameter Store default tier configuration.</p>
/// <p>The default tier when you begin using Parameter Store is the standard-parameter tier. If you use the advanced-parameter tier, you can specify one of the following as the default:</p>
/// <ul>
/// <li>
/// <p><b>Advanced</b>: With this option, Parameter Store evaluates all requests as advanced parameters.</p></li>
/// <li>
/// <p><b>Intelligent-Tiering</b>: With this option, Parameter Store evaluates each request to determine if the parameter is standard or advanced.</p>
/// <p>If the request doesn't include any options that require an advanced parameter, the parameter is created in the standard-parameter tier. If one or more options requiring an advanced parameter are included in the request, Parameter Store create a parameter in the advanced-parameter tier.</p>
/// <p>This approach helps control your parameter-related costs by always creating standard parameters unless an advanced parameter is necessary.</p></li>
/// </ul>
/// <p>Options that require an advanced parameter include the following:</p>
/// <ul>
/// <li>
/// <p>The content size of the parameter is more than 4 KB.</p></li>
/// <li>
/// <p>The parameter uses a parameter policy.</p></li>
/// <li>
/// <p>More than 10,000 parameters already exist in your Amazon Web Services account in the current Amazon Web Services Region.</p></li>
/// </ul>
/// <p>For more information about configuring the default tier option, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html">Specifying a default parameter tier</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
pub tier: ::std::option::Option<crate::types::ParameterTier>,
/// <p>One or more policies to apply to a parameter. This operation takes a JSON array. Parameter Store, a capability of Amazon Web Services Systems Manager supports the following policy types:</p>
/// <p>Expiration: This policy deletes the parameter after it expires. When you create the policy, you specify the expiration date. You can update the expiration date and time by updating the policy. Updating the <i>parameter</i> doesn't affect the expiration date and time. When the expiration time is reached, Parameter Store deletes the parameter.</p>
/// <p>ExpirationNotification: This policy initiates an event in Amazon CloudWatch Events that notifies you about the expiration. By using this policy, you can receive notification before or after the expiration time is reached, in units of days or hours.</p>
/// <p>NoChangeNotification: This policy initiates a CloudWatch Events event if a parameter hasn't been modified for a specified period of time. This policy type is useful when, for example, a secret needs to be changed within a period of time, but it hasn't been changed.</p>
/// <p>All existing policies are preserved until you send new policies or an empty policy. For more information about parameter policies, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a>.</p>
pub policies: ::std::option::Option<::std::string::String>,
/// <p>The data type for a <code>String</code> parameter. Supported data types include plain text and Amazon Machine Image (AMI) IDs.</p>
/// <p><b>The following data type values are supported.</b></p>
/// <ul>
/// <li>
/// <p><code>text</code></p></li>
/// <li>
/// <p><code>aws:ec2:image</code></p></li>
/// <li>
/// <p><code>aws:ssm:integration</code></p></li>
/// </ul>
/// <p>When you create a <code>String</code> parameter and specify <code>aws:ec2:image</code>, Amazon Web Services Systems Manager validates the parameter value is in the required format, such as <code>ami-12345abcdeEXAMPLE</code>, and that the specified AMI is available in your Amazon Web Services account.</p><note>
/// <p>If the action is successful, the service sends back an HTTP 200 response which indicates a successful <code>PutParameter</code> call for all cases except for data type <code>aws:ec2:image</code>. If you call <code>PutParameter</code> with <code>aws:ec2:image</code> data type, a successful HTTP 200 response does not guarantee that your parameter was successfully created or updated. The <code>aws:ec2:image</code> value is validated asynchronously, and the <code>PutParameter</code> call returns before the validation is complete. If you submit an invalid AMI value, the PutParameter operation will return success, but the asynchronous validation will fail and the parameter will not be created or updated. To monitor whether your <code>aws:ec2:image</code> parameters are created successfully, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-cwe.html">Setting up notifications or trigger actions based on Parameter Store events</a>. For more information about AMI format validation , see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html">Native parameter support for Amazon Machine Image (AMI) IDs</a>.</p>
/// </note>
pub data_type: ::std::option::Option<::std::string::String>,
}
impl PutParameterInput {
/// <p>The fully qualified name of the parameter that you want to add to the system. The fully qualified name includes the complete hierarchy of the parameter path and name. For parameters in a hierarchy, you must include a leading forward slash character (/) when you create or reference a parameter. For example: <code>/Dev/DBServer/MySQL/db-string13</code></p>
/// <p>Naming Constraints:</p>
/// <ul>
/// <li>
/// <p>Parameter names are case sensitive.</p></li>
/// <li>
/// <p>A parameter name must be unique within an Amazon Web Services Region</p></li>
/// <li>
/// <p>A parameter name can't be prefixed with "<code>aws</code>" or "<code>ssm</code>" (case-insensitive).</p></li>
/// <li>
/// <p>Parameter names can include only the following symbols and letters: <code>a-zA-Z0-9_.-</code></p>
/// <p>In addition, the slash character ( / ) is used to delineate hierarchies in parameter names. For example: <code>/Dev/Production/East/Project-ABC/MyParameter</code></p></li>
/// <li>
/// <p>A parameter name can't include spaces.</p></li>
/// <li>
/// <p>Parameter hierarchies are limited to a maximum depth of fifteen levels.</p></li>
/// </ul>
/// <p>For additional information about valid values for parameter names, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html">Creating Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
/// <p>The maximum length constraint of 2048 characters listed below includes 1037 characters reserved for internal use by Systems Manager. The maximum length for a parameter name that you create is 1011 characters. This includes the characters in the ARN that precede the name you specify, such as <code>arn:aws:ssm:us-east-2:111122223333:parameter/</code>.</p>
/// </note>
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
/// <p>Information about the parameter that you want to add to the system. Optional but recommended.</p><important>
/// <p>Don't enter personally identifiable information in this field.</p>
/// </important>
pub fn description(&self) -> ::std::option::Option<&str> {
self.description.as_deref()
}
/// <p>The parameter value that you want to add to the system. Standard parameters have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB.</p><note>
/// <p>Parameters can't be referenced or nested in the values of other parameters. You can't include <code>{{}}</code> or <code>{{ssm:<i>parameter-name</i>}}</code> in a parameter value.</p>
/// </note>
pub fn value(&self) -> ::std::option::Option<&str> {
self.value.as_deref()
}
/// <p>The type of parameter that you want to add to the system.</p><note>
/// <p><code>SecureString</code> isn't currently supported for CloudFormation templates.</p>
/// </note>
/// <p>Items in a <code>StringList</code> must be separated by a comma (,). You can't use other punctuation or special character to escape items in the list. If you have a parameter value that requires a comma, then use the <code>String</code> data type.</p><important>
/// <p>Specifying a parameter type isn't required when updating a parameter. You must specify a parameter type when creating a parameter.</p>
/// </important>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::ParameterType> {
self.r#type.as_ref()
}
/// <p>The Key Management Service (KMS) ID that you want to use to encrypt a parameter. Use a custom key for better security. Required for parameters that use the <code>SecureString</code> data type.</p>
/// <p>If you don't specify a key ID, the system uses the default key associated with your Amazon Web Services account which is not as secure as using a custom key.</p>
/// <ul>
/// <li>
/// <p>To use a custom KMS key, choose the <code>SecureString</code> data type with the <code>Key ID</code> parameter.</p></li>
/// </ul>
pub fn key_id(&self) -> ::std::option::Option<&str> {
self.key_id.as_deref()
}
/// <p>Overwrite an existing parameter. The default value is <code>false</code>.</p>
pub fn overwrite(&self) -> ::std::option::Option<bool> {
self.overwrite
}
/// <p>A regular expression used to validate the parameter value. For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$</p>
pub fn allowed_pattern(&self) -> ::std::option::Option<&str> {
self.allowed_pattern.as_deref()
}
/// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key-value pairs:</p>
/// <ul>
/// <li>
/// <p><code>Key=Resource,Value=S3bucket</code></p></li>
/// <li>
/// <p><code>Key=OS,Value=Windows</code></p></li>
/// <li>
/// <p><code>Key=ParameterType,Value=LicenseKey</code></p></li>
/// </ul><note>
/// <p>To add tags to an existing Systems Manager parameter, use the <code>AddTagsToResource</code> operation.</p>
/// </note>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
pub fn tags(&self) -> &[crate::types::Tag] {
self.tags.as_deref().unwrap_or_default()
}
/// <p>The parameter tier to assign to a parameter.</p>
/// <p>Parameter Store offers a standard tier and an advanced tier for parameters. Standard parameters have a content size limit of 4 KB and can't be configured to use parameter policies. You can create a maximum of 10,000 standard parameters for each Region in an Amazon Web Services account. Standard parameters are offered at no additional cost.</p>
/// <p>Advanced parameters have a content size limit of 8 KB and can be configured to use parameter policies. You can create a maximum of 100,000 advanced parameters for each Region in an Amazon Web Services account. Advanced parameters incur a charge. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html">Standard and advanced parameter tiers</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
/// <p>You can change a standard parameter to an advanced parameter any time. But you can't revert an advanced parameter to a standard parameter. Reverting an advanced parameter to a standard parameter would result in data loss because the system would truncate the size of the parameter from 8 KB to 4 KB. Reverting would also remove any policies attached to the parameter. Lastly, advanced parameters use a different form of encryption than standard parameters.</p>
/// <p>If you no longer need an advanced parameter, or if you no longer want to incur charges for an advanced parameter, you must delete it and recreate it as a new standard parameter.</p>
/// <p><b>Using the Default Tier Configuration</b></p>
/// <p>In <code>PutParameter</code> requests, you can specify the tier to create the parameter in. Whenever you specify a tier in the request, Parameter Store creates or updates the parameter according to that request. However, if you don't specify a tier in a request, Parameter Store assigns the tier based on the current Parameter Store default tier configuration.</p>
/// <p>The default tier when you begin using Parameter Store is the standard-parameter tier. If you use the advanced-parameter tier, you can specify one of the following as the default:</p>
/// <ul>
/// <li>
/// <p><b>Advanced</b>: With this option, Parameter Store evaluates all requests as advanced parameters.</p></li>
/// <li>
/// <p><b>Intelligent-Tiering</b>: With this option, Parameter Store evaluates each request to determine if the parameter is standard or advanced.</p>
/// <p>If the request doesn't include any options that require an advanced parameter, the parameter is created in the standard-parameter tier. If one or more options requiring an advanced parameter are included in the request, Parameter Store create a parameter in the advanced-parameter tier.</p>
/// <p>This approach helps control your parameter-related costs by always creating standard parameters unless an advanced parameter is necessary.</p></li>
/// </ul>
/// <p>Options that require an advanced parameter include the following:</p>
/// <ul>
/// <li>
/// <p>The content size of the parameter is more than 4 KB.</p></li>
/// <li>
/// <p>The parameter uses a parameter policy.</p></li>
/// <li>
/// <p>More than 10,000 parameters already exist in your Amazon Web Services account in the current Amazon Web Services Region.</p></li>
/// </ul>
/// <p>For more information about configuring the default tier option, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html">Specifying a default parameter tier</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
pub fn tier(&self) -> ::std::option::Option<&crate::types::ParameterTier> {
self.tier.as_ref()
}
/// <p>One or more policies to apply to a parameter. This operation takes a JSON array. Parameter Store, a capability of Amazon Web Services Systems Manager supports the following policy types:</p>
/// <p>Expiration: This policy deletes the parameter after it expires. When you create the policy, you specify the expiration date. You can update the expiration date and time by updating the policy. Updating the <i>parameter</i> doesn't affect the expiration date and time. When the expiration time is reached, Parameter Store deletes the parameter.</p>
/// <p>ExpirationNotification: This policy initiates an event in Amazon CloudWatch Events that notifies you about the expiration. By using this policy, you can receive notification before or after the expiration time is reached, in units of days or hours.</p>
/// <p>NoChangeNotification: This policy initiates a CloudWatch Events event if a parameter hasn't been modified for a specified period of time. This policy type is useful when, for example, a secret needs to be changed within a period of time, but it hasn't been changed.</p>
/// <p>All existing policies are preserved until you send new policies or an empty policy. For more information about parameter policies, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a>.</p>
pub fn policies(&self) -> ::std::option::Option<&str> {
self.policies.as_deref()
}
/// <p>The data type for a <code>String</code> parameter. Supported data types include plain text and Amazon Machine Image (AMI) IDs.</p>
/// <p><b>The following data type values are supported.</b></p>
/// <ul>
/// <li>
/// <p><code>text</code></p></li>
/// <li>
/// <p><code>aws:ec2:image</code></p></li>
/// <li>
/// <p><code>aws:ssm:integration</code></p></li>
/// </ul>
/// <p>When you create a <code>String</code> parameter and specify <code>aws:ec2:image</code>, Amazon Web Services Systems Manager validates the parameter value is in the required format, such as <code>ami-12345abcdeEXAMPLE</code>, and that the specified AMI is available in your Amazon Web Services account.</p><note>
/// <p>If the action is successful, the service sends back an HTTP 200 response which indicates a successful <code>PutParameter</code> call for all cases except for data type <code>aws:ec2:image</code>. If you call <code>PutParameter</code> with <code>aws:ec2:image</code> data type, a successful HTTP 200 response does not guarantee that your parameter was successfully created or updated. The <code>aws:ec2:image</code> value is validated asynchronously, and the <code>PutParameter</code> call returns before the validation is complete. If you submit an invalid AMI value, the PutParameter operation will return success, but the asynchronous validation will fail and the parameter will not be created or updated. To monitor whether your <code>aws:ec2:image</code> parameters are created successfully, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-cwe.html">Setting up notifications or trigger actions based on Parameter Store events</a>. For more information about AMI format validation , see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html">Native parameter support for Amazon Machine Image (AMI) IDs</a>.</p>
/// </note>
pub fn data_type(&self) -> ::std::option::Option<&str> {
self.data_type.as_deref()
}
}
impl ::std::fmt::Debug for PutParameterInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("PutParameterInput");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("value", &"*** Sensitive Data Redacted ***");
formatter.field("r#type", &self.r#type);
formatter.field("key_id", &self.key_id);
formatter.field("overwrite", &self.overwrite);
formatter.field("allowed_pattern", &self.allowed_pattern);
formatter.field("tags", &self.tags);
formatter.field("tier", &self.tier);
formatter.field("policies", &self.policies);
formatter.field("data_type", &self.data_type);
formatter.finish()
}
}
impl PutParameterInput {
/// Creates a new builder-style object to manufacture [`PutParameterInput`](crate::operation::put_parameter::PutParameterInput).
pub fn builder() -> crate::operation::put_parameter::builders::PutParameterInputBuilder {
crate::operation::put_parameter::builders::PutParameterInputBuilder::default()
}
}
/// A builder for [`PutParameterInput`](crate::operation::put_parameter::PutParameterInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
pub struct PutParameterInputBuilder {
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) description: ::std::option::Option<::std::string::String>,
pub(crate) value: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<crate::types::ParameterType>,
pub(crate) key_id: ::std::option::Option<::std::string::String>,
pub(crate) overwrite: ::std::option::Option<bool>,
pub(crate) allowed_pattern: ::std::option::Option<::std::string::String>,
pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
pub(crate) tier: ::std::option::Option<crate::types::ParameterTier>,
pub(crate) policies: ::std::option::Option<::std::string::String>,
pub(crate) data_type: ::std::option::Option<::std::string::String>,
}
impl PutParameterInputBuilder {
/// <p>The fully qualified name of the parameter that you want to add to the system. The fully qualified name includes the complete hierarchy of the parameter path and name. For parameters in a hierarchy, you must include a leading forward slash character (/) when you create or reference a parameter. For example: <code>/Dev/DBServer/MySQL/db-string13</code></p>
/// <p>Naming Constraints:</p>
/// <ul>
/// <li>
/// <p>Parameter names are case sensitive.</p></li>
/// <li>
/// <p>A parameter name must be unique within an Amazon Web Services Region</p></li>
/// <li>
/// <p>A parameter name can't be prefixed with "<code>aws</code>" or "<code>ssm</code>" (case-insensitive).</p></li>
/// <li>
/// <p>Parameter names can include only the following symbols and letters: <code>a-zA-Z0-9_.-</code></p>
/// <p>In addition, the slash character ( / ) is used to delineate hierarchies in parameter names. For example: <code>/Dev/Production/East/Project-ABC/MyParameter</code></p></li>
/// <li>
/// <p>A parameter name can't include spaces.</p></li>
/// <li>
/// <p>Parameter hierarchies are limited to a maximum depth of fifteen levels.</p></li>
/// </ul>
/// <p>For additional information about valid values for parameter names, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html">Creating Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
/// <p>The maximum length constraint of 2048 characters listed below includes 1037 characters reserved for internal use by Systems Manager. The maximum length for a parameter name that you create is 1011 characters. This includes the characters in the ARN that precede the name you specify, such as <code>arn:aws:ssm:us-east-2:111122223333:parameter/</code>.</p>
/// </note>
/// This field is required.
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
/// <p>The fully qualified name of the parameter that you want to add to the system. The fully qualified name includes the complete hierarchy of the parameter path and name. For parameters in a hierarchy, you must include a leading forward slash character (/) when you create or reference a parameter. For example: <code>/Dev/DBServer/MySQL/db-string13</code></p>
/// <p>Naming Constraints:</p>
/// <ul>
/// <li>
/// <p>Parameter names are case sensitive.</p></li>
/// <li>
/// <p>A parameter name must be unique within an Amazon Web Services Region</p></li>
/// <li>
/// <p>A parameter name can't be prefixed with "<code>aws</code>" or "<code>ssm</code>" (case-insensitive).</p></li>
/// <li>
/// <p>Parameter names can include only the following symbols and letters: <code>a-zA-Z0-9_.-</code></p>
/// <p>In addition, the slash character ( / ) is used to delineate hierarchies in parameter names. For example: <code>/Dev/Production/East/Project-ABC/MyParameter</code></p></li>
/// <li>
/// <p>A parameter name can't include spaces.</p></li>
/// <li>
/// <p>Parameter hierarchies are limited to a maximum depth of fifteen levels.</p></li>
/// </ul>
/// <p>For additional information about valid values for parameter names, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html">Creating Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
/// <p>The maximum length constraint of 2048 characters listed below includes 1037 characters reserved for internal use by Systems Manager. The maximum length for a parameter name that you create is 1011 characters. This includes the characters in the ARN that precede the name you specify, such as <code>arn:aws:ssm:us-east-2:111122223333:parameter/</code>.</p>
/// </note>
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
/// <p>The fully qualified name of the parameter that you want to add to the system. The fully qualified name includes the complete hierarchy of the parameter path and name. For parameters in a hierarchy, you must include a leading forward slash character (/) when you create or reference a parameter. For example: <code>/Dev/DBServer/MySQL/db-string13</code></p>
/// <p>Naming Constraints:</p>
/// <ul>
/// <li>
/// <p>Parameter names are case sensitive.</p></li>
/// <li>
/// <p>A parameter name must be unique within an Amazon Web Services Region</p></li>
/// <li>
/// <p>A parameter name can't be prefixed with "<code>aws</code>" or "<code>ssm</code>" (case-insensitive).</p></li>
/// <li>
/// <p>Parameter names can include only the following symbols and letters: <code>a-zA-Z0-9_.-</code></p>
/// <p>In addition, the slash character ( / ) is used to delineate hierarchies in parameter names. For example: <code>/Dev/Production/East/Project-ABC/MyParameter</code></p></li>
/// <li>
/// <p>A parameter name can't include spaces.</p></li>
/// <li>
/// <p>Parameter hierarchies are limited to a maximum depth of fifteen levels.</p></li>
/// </ul>
/// <p>For additional information about valid values for parameter names, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-su-create.html">Creating Systems Manager parameters</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
/// <p>The maximum length constraint of 2048 characters listed below includes 1037 characters reserved for internal use by Systems Manager. The maximum length for a parameter name that you create is 1011 characters. This includes the characters in the ARN that precede the name you specify, such as <code>arn:aws:ssm:us-east-2:111122223333:parameter/</code>.</p>
/// </note>
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
/// <p>Information about the parameter that you want to add to the system. Optional but recommended.</p><important>
/// <p>Don't enter personally identifiable information in this field.</p>
/// </important>
pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.description = ::std::option::Option::Some(input.into());
self
}
/// <p>Information about the parameter that you want to add to the system. Optional but recommended.</p><important>
/// <p>Don't enter personally identifiable information in this field.</p>
/// </important>
pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.description = input;
self
}
/// <p>Information about the parameter that you want to add to the system. Optional but recommended.</p><important>
/// <p>Don't enter personally identifiable information in this field.</p>
/// </important>
pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
&self.description
}
/// <p>The parameter value that you want to add to the system. Standard parameters have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB.</p><note>
/// <p>Parameters can't be referenced or nested in the values of other parameters. You can't include <code>{{}}</code> or <code>{{ssm:<i>parameter-name</i>}}</code> in a parameter value.</p>
/// </note>
/// This field is required.
pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.value = ::std::option::Option::Some(input.into());
self
}
/// <p>The parameter value that you want to add to the system. Standard parameters have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB.</p><note>
/// <p>Parameters can't be referenced or nested in the values of other parameters. You can't include <code>{{}}</code> or <code>{{ssm:<i>parameter-name</i>}}</code> in a parameter value.</p>
/// </note>
pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.value = input;
self
}
/// <p>The parameter value that you want to add to the system. Standard parameters have a value limit of 4 KB. Advanced parameters have a value limit of 8 KB.</p><note>
/// <p>Parameters can't be referenced or nested in the values of other parameters. You can't include <code>{{}}</code> or <code>{{ssm:<i>parameter-name</i>}}</code> in a parameter value.</p>
/// </note>
pub fn get_value(&self) -> &::std::option::Option<::std::string::String> {
&self.value
}
/// <p>The type of parameter that you want to add to the system.</p><note>
/// <p><code>SecureString</code> isn't currently supported for CloudFormation templates.</p>
/// </note>
/// <p>Items in a <code>StringList</code> must be separated by a comma (,). You can't use other punctuation or special character to escape items in the list. If you have a parameter value that requires a comma, then use the <code>String</code> data type.</p><important>
/// <p>Specifying a parameter type isn't required when updating a parameter. You must specify a parameter type when creating a parameter.</p>
/// </important>
pub fn r#type(mut self, input: crate::types::ParameterType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The type of parameter that you want to add to the system.</p><note>
/// <p><code>SecureString</code> isn't currently supported for CloudFormation templates.</p>
/// </note>
/// <p>Items in a <code>StringList</code> must be separated by a comma (,). You can't use other punctuation or special character to escape items in the list. If you have a parameter value that requires a comma, then use the <code>String</code> data type.</p><important>
/// <p>Specifying a parameter type isn't required when updating a parameter. You must specify a parameter type when creating a parameter.</p>
/// </important>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::ParameterType>) -> Self {
self.r#type = input;
self
}
/// <p>The type of parameter that you want to add to the system.</p><note>
/// <p><code>SecureString</code> isn't currently supported for CloudFormation templates.</p>
/// </note>
/// <p>Items in a <code>StringList</code> must be separated by a comma (,). You can't use other punctuation or special character to escape items in the list. If you have a parameter value that requires a comma, then use the <code>String</code> data type.</p><important>
/// <p>Specifying a parameter type isn't required when updating a parameter. You must specify a parameter type when creating a parameter.</p>
/// </important>
pub fn get_type(&self) -> &::std::option::Option<crate::types::ParameterType> {
&self.r#type
}
/// <p>The Key Management Service (KMS) ID that you want to use to encrypt a parameter. Use a custom key for better security. Required for parameters that use the <code>SecureString</code> data type.</p>
/// <p>If you don't specify a key ID, the system uses the default key associated with your Amazon Web Services account which is not as secure as using a custom key.</p>
/// <ul>
/// <li>
/// <p>To use a custom KMS key, choose the <code>SecureString</code> data type with the <code>Key ID</code> parameter.</p></li>
/// </ul>
pub fn key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.key_id = ::std::option::Option::Some(input.into());
self
}
/// <p>The Key Management Service (KMS) ID that you want to use to encrypt a parameter. Use a custom key for better security. Required for parameters that use the <code>SecureString</code> data type.</p>
/// <p>If you don't specify a key ID, the system uses the default key associated with your Amazon Web Services account which is not as secure as using a custom key.</p>
/// <ul>
/// <li>
/// <p>To use a custom KMS key, choose the <code>SecureString</code> data type with the <code>Key ID</code> parameter.</p></li>
/// </ul>
pub fn set_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.key_id = input;
self
}
/// <p>The Key Management Service (KMS) ID that you want to use to encrypt a parameter. Use a custom key for better security. Required for parameters that use the <code>SecureString</code> data type.</p>
/// <p>If you don't specify a key ID, the system uses the default key associated with your Amazon Web Services account which is not as secure as using a custom key.</p>
/// <ul>
/// <li>
/// <p>To use a custom KMS key, choose the <code>SecureString</code> data type with the <code>Key ID</code> parameter.</p></li>
/// </ul>
pub fn get_key_id(&self) -> &::std::option::Option<::std::string::String> {
&self.key_id
}
/// <p>Overwrite an existing parameter. The default value is <code>false</code>.</p>
pub fn overwrite(mut self, input: bool) -> Self {
self.overwrite = ::std::option::Option::Some(input);
self
}
/// <p>Overwrite an existing parameter. The default value is <code>false</code>.</p>
pub fn set_overwrite(mut self, input: ::std::option::Option<bool>) -> Self {
self.overwrite = input;
self
}
/// <p>Overwrite an existing parameter. The default value is <code>false</code>.</p>
pub fn get_overwrite(&self) -> &::std::option::Option<bool> {
&self.overwrite
}
/// <p>A regular expression used to validate the parameter value. For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$</p>
pub fn allowed_pattern(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.allowed_pattern = ::std::option::Option::Some(input.into());
self
}
/// <p>A regular expression used to validate the parameter value. For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$</p>
pub fn set_allowed_pattern(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.allowed_pattern = input;
self
}
/// <p>A regular expression used to validate the parameter value. For example, for String types with values restricted to numbers, you can specify the following: AllowedPattern=^\d+$</p>
pub fn get_allowed_pattern(&self) -> &::std::option::Option<::std::string::String> {
&self.allowed_pattern
}
/// Appends an item to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key-value pairs:</p>
/// <ul>
/// <li>
/// <p><code>Key=Resource,Value=S3bucket</code></p></li>
/// <li>
/// <p><code>Key=OS,Value=Windows</code></p></li>
/// <li>
/// <p><code>Key=ParameterType,Value=LicenseKey</code></p></li>
/// </ul><note>
/// <p>To add tags to an existing Systems Manager parameter, use the <code>AddTagsToResource</code> operation.</p>
/// </note>
pub fn tags(mut self, input: crate::types::Tag) -> Self {
let mut v = self.tags.unwrap_or_default();
v.push(input);
self.tags = ::std::option::Option::Some(v);
self
}
/// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key-value pairs:</p>
/// <ul>
/// <li>
/// <p><code>Key=Resource,Value=S3bucket</code></p></li>
/// <li>
/// <p><code>Key=OS,Value=Windows</code></p></li>
/// <li>
/// <p><code>Key=ParameterType,Value=LicenseKey</code></p></li>
/// </ul><note>
/// <p>To add tags to an existing Systems Manager parameter, use the <code>AddTagsToResource</code> operation.</p>
/// </note>
pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
self.tags = input;
self
}
/// <p>Optional metadata that you assign to a resource. Tags enable you to categorize a resource in different ways, such as by purpose, owner, or environment. For example, you might want to tag a Systems Manager parameter to identify the type of resource to which it applies, the environment, or the type of configuration data referenced by the parameter. In this case, you could specify the following key-value pairs:</p>
/// <ul>
/// <li>
/// <p><code>Key=Resource,Value=S3bucket</code></p></li>
/// <li>
/// <p><code>Key=OS,Value=Windows</code></p></li>
/// <li>
/// <p><code>Key=ParameterType,Value=LicenseKey</code></p></li>
/// </ul><note>
/// <p>To add tags to an existing Systems Manager parameter, use the <code>AddTagsToResource</code> operation.</p>
/// </note>
pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
&self.tags
}
/// <p>The parameter tier to assign to a parameter.</p>
/// <p>Parameter Store offers a standard tier and an advanced tier for parameters. Standard parameters have a content size limit of 4 KB and can't be configured to use parameter policies. You can create a maximum of 10,000 standard parameters for each Region in an Amazon Web Services account. Standard parameters are offered at no additional cost.</p>
/// <p>Advanced parameters have a content size limit of 8 KB and can be configured to use parameter policies. You can create a maximum of 100,000 advanced parameters for each Region in an Amazon Web Services account. Advanced parameters incur a charge. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html">Standard and advanced parameter tiers</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
/// <p>You can change a standard parameter to an advanced parameter any time. But you can't revert an advanced parameter to a standard parameter. Reverting an advanced parameter to a standard parameter would result in data loss because the system would truncate the size of the parameter from 8 KB to 4 KB. Reverting would also remove any policies attached to the parameter. Lastly, advanced parameters use a different form of encryption than standard parameters.</p>
/// <p>If you no longer need an advanced parameter, or if you no longer want to incur charges for an advanced parameter, you must delete it and recreate it as a new standard parameter.</p>
/// <p><b>Using the Default Tier Configuration</b></p>
/// <p>In <code>PutParameter</code> requests, you can specify the tier to create the parameter in. Whenever you specify a tier in the request, Parameter Store creates or updates the parameter according to that request. However, if you don't specify a tier in a request, Parameter Store assigns the tier based on the current Parameter Store default tier configuration.</p>
/// <p>The default tier when you begin using Parameter Store is the standard-parameter tier. If you use the advanced-parameter tier, you can specify one of the following as the default:</p>
/// <ul>
/// <li>
/// <p><b>Advanced</b>: With this option, Parameter Store evaluates all requests as advanced parameters.</p></li>
/// <li>
/// <p><b>Intelligent-Tiering</b>: With this option, Parameter Store evaluates each request to determine if the parameter is standard or advanced.</p>
/// <p>If the request doesn't include any options that require an advanced parameter, the parameter is created in the standard-parameter tier. If one or more options requiring an advanced parameter are included in the request, Parameter Store create a parameter in the advanced-parameter tier.</p>
/// <p>This approach helps control your parameter-related costs by always creating standard parameters unless an advanced parameter is necessary.</p></li>
/// </ul>
/// <p>Options that require an advanced parameter include the following:</p>
/// <ul>
/// <li>
/// <p>The content size of the parameter is more than 4 KB.</p></li>
/// <li>
/// <p>The parameter uses a parameter policy.</p></li>
/// <li>
/// <p>More than 10,000 parameters already exist in your Amazon Web Services account in the current Amazon Web Services Region.</p></li>
/// </ul>
/// <p>For more information about configuring the default tier option, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html">Specifying a default parameter tier</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
pub fn tier(mut self, input: crate::types::ParameterTier) -> Self {
self.tier = ::std::option::Option::Some(input);
self
}
/// <p>The parameter tier to assign to a parameter.</p>
/// <p>Parameter Store offers a standard tier and an advanced tier for parameters. Standard parameters have a content size limit of 4 KB and can't be configured to use parameter policies. You can create a maximum of 10,000 standard parameters for each Region in an Amazon Web Services account. Standard parameters are offered at no additional cost.</p>
/// <p>Advanced parameters have a content size limit of 8 KB and can be configured to use parameter policies. You can create a maximum of 100,000 advanced parameters for each Region in an Amazon Web Services account. Advanced parameters incur a charge. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html">Standard and advanced parameter tiers</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
/// <p>You can change a standard parameter to an advanced parameter any time. But you can't revert an advanced parameter to a standard parameter. Reverting an advanced parameter to a standard parameter would result in data loss because the system would truncate the size of the parameter from 8 KB to 4 KB. Reverting would also remove any policies attached to the parameter. Lastly, advanced parameters use a different form of encryption than standard parameters.</p>
/// <p>If you no longer need an advanced parameter, or if you no longer want to incur charges for an advanced parameter, you must delete it and recreate it as a new standard parameter.</p>
/// <p><b>Using the Default Tier Configuration</b></p>
/// <p>In <code>PutParameter</code> requests, you can specify the tier to create the parameter in. Whenever you specify a tier in the request, Parameter Store creates or updates the parameter according to that request. However, if you don't specify a tier in a request, Parameter Store assigns the tier based on the current Parameter Store default tier configuration.</p>
/// <p>The default tier when you begin using Parameter Store is the standard-parameter tier. If you use the advanced-parameter tier, you can specify one of the following as the default:</p>
/// <ul>
/// <li>
/// <p><b>Advanced</b>: With this option, Parameter Store evaluates all requests as advanced parameters.</p></li>
/// <li>
/// <p><b>Intelligent-Tiering</b>: With this option, Parameter Store evaluates each request to determine if the parameter is standard or advanced.</p>
/// <p>If the request doesn't include any options that require an advanced parameter, the parameter is created in the standard-parameter tier. If one or more options requiring an advanced parameter are included in the request, Parameter Store create a parameter in the advanced-parameter tier.</p>
/// <p>This approach helps control your parameter-related costs by always creating standard parameters unless an advanced parameter is necessary.</p></li>
/// </ul>
/// <p>Options that require an advanced parameter include the following:</p>
/// <ul>
/// <li>
/// <p>The content size of the parameter is more than 4 KB.</p></li>
/// <li>
/// <p>The parameter uses a parameter policy.</p></li>
/// <li>
/// <p>More than 10,000 parameters already exist in your Amazon Web Services account in the current Amazon Web Services Region.</p></li>
/// </ul>
/// <p>For more information about configuring the default tier option, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html">Specifying a default parameter tier</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
pub fn set_tier(mut self, input: ::std::option::Option<crate::types::ParameterTier>) -> Self {
self.tier = input;
self
}
/// <p>The parameter tier to assign to a parameter.</p>
/// <p>Parameter Store offers a standard tier and an advanced tier for parameters. Standard parameters have a content size limit of 4 KB and can't be configured to use parameter policies. You can create a maximum of 10,000 standard parameters for each Region in an Amazon Web Services account. Standard parameters are offered at no additional cost.</p>
/// <p>Advanced parameters have a content size limit of 8 KB and can be configured to use parameter policies. You can create a maximum of 100,000 advanced parameters for each Region in an Amazon Web Services account. Advanced parameters incur a charge. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-advanced-parameters.html">Standard and advanced parameter tiers</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
/// <p>You can change a standard parameter to an advanced parameter any time. But you can't revert an advanced parameter to a standard parameter. Reverting an advanced parameter to a standard parameter would result in data loss because the system would truncate the size of the parameter from 8 KB to 4 KB. Reverting would also remove any policies attached to the parameter. Lastly, advanced parameters use a different form of encryption than standard parameters.</p>
/// <p>If you no longer need an advanced parameter, or if you no longer want to incur charges for an advanced parameter, you must delete it and recreate it as a new standard parameter.</p>
/// <p><b>Using the Default Tier Configuration</b></p>
/// <p>In <code>PutParameter</code> requests, you can specify the tier to create the parameter in. Whenever you specify a tier in the request, Parameter Store creates or updates the parameter according to that request. However, if you don't specify a tier in a request, Parameter Store assigns the tier based on the current Parameter Store default tier configuration.</p>
/// <p>The default tier when you begin using Parameter Store is the standard-parameter tier. If you use the advanced-parameter tier, you can specify one of the following as the default:</p>
/// <ul>
/// <li>
/// <p><b>Advanced</b>: With this option, Parameter Store evaluates all requests as advanced parameters.</p></li>
/// <li>
/// <p><b>Intelligent-Tiering</b>: With this option, Parameter Store evaluates each request to determine if the parameter is standard or advanced.</p>
/// <p>If the request doesn't include any options that require an advanced parameter, the parameter is created in the standard-parameter tier. If one or more options requiring an advanced parameter are included in the request, Parameter Store create a parameter in the advanced-parameter tier.</p>
/// <p>This approach helps control your parameter-related costs by always creating standard parameters unless an advanced parameter is necessary.</p></li>
/// </ul>
/// <p>Options that require an advanced parameter include the following:</p>
/// <ul>
/// <li>
/// <p>The content size of the parameter is more than 4 KB.</p></li>
/// <li>
/// <p>The parameter uses a parameter policy.</p></li>
/// <li>
/// <p>More than 10,000 parameters already exist in your Amazon Web Services account in the current Amazon Web Services Region.</p></li>
/// </ul>
/// <p>For more information about configuring the default tier option, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/ps-default-tier.html">Specifying a default parameter tier</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
pub fn get_tier(&self) -> &::std::option::Option<crate::types::ParameterTier> {
&self.tier
}
/// <p>One or more policies to apply to a parameter. This operation takes a JSON array. Parameter Store, a capability of Amazon Web Services Systems Manager supports the following policy types:</p>
/// <p>Expiration: This policy deletes the parameter after it expires. When you create the policy, you specify the expiration date. You can update the expiration date and time by updating the policy. Updating the <i>parameter</i> doesn't affect the expiration date and time. When the expiration time is reached, Parameter Store deletes the parameter.</p>
/// <p>ExpirationNotification: This policy initiates an event in Amazon CloudWatch Events that notifies you about the expiration. By using this policy, you can receive notification before or after the expiration time is reached, in units of days or hours.</p>
/// <p>NoChangeNotification: This policy initiates a CloudWatch Events event if a parameter hasn't been modified for a specified period of time. This policy type is useful when, for example, a secret needs to be changed within a period of time, but it hasn't been changed.</p>
/// <p>All existing policies are preserved until you send new policies or an empty policy. For more information about parameter policies, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a>.</p>
pub fn policies(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.policies = ::std::option::Option::Some(input.into());
self
}
/// <p>One or more policies to apply to a parameter. This operation takes a JSON array. Parameter Store, a capability of Amazon Web Services Systems Manager supports the following policy types:</p>
/// <p>Expiration: This policy deletes the parameter after it expires. When you create the policy, you specify the expiration date. You can update the expiration date and time by updating the policy. Updating the <i>parameter</i> doesn't affect the expiration date and time. When the expiration time is reached, Parameter Store deletes the parameter.</p>
/// <p>ExpirationNotification: This policy initiates an event in Amazon CloudWatch Events that notifies you about the expiration. By using this policy, you can receive notification before or after the expiration time is reached, in units of days or hours.</p>
/// <p>NoChangeNotification: This policy initiates a CloudWatch Events event if a parameter hasn't been modified for a specified period of time. This policy type is useful when, for example, a secret needs to be changed within a period of time, but it hasn't been changed.</p>
/// <p>All existing policies are preserved until you send new policies or an empty policy. For more information about parameter policies, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a>.</p>
pub fn set_policies(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.policies = input;
self
}
/// <p>One or more policies to apply to a parameter. This operation takes a JSON array. Parameter Store, a capability of Amazon Web Services Systems Manager supports the following policy types:</p>
/// <p>Expiration: This policy deletes the parameter after it expires. When you create the policy, you specify the expiration date. You can update the expiration date and time by updating the policy. Updating the <i>parameter</i> doesn't affect the expiration date and time. When the expiration time is reached, Parameter Store deletes the parameter.</p>
/// <p>ExpirationNotification: This policy initiates an event in Amazon CloudWatch Events that notifies you about the expiration. By using this policy, you can receive notification before or after the expiration time is reached, in units of days or hours.</p>
/// <p>NoChangeNotification: This policy initiates a CloudWatch Events event if a parameter hasn't been modified for a specified period of time. This policy type is useful when, for example, a secret needs to be changed within a period of time, but it hasn't been changed.</p>
/// <p>All existing policies are preserved until you send new policies or an empty policy. For more information about parameter policies, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-policies.html">Assigning parameter policies</a>.</p>
pub fn get_policies(&self) -> &::std::option::Option<::std::string::String> {
&self.policies
}
/// <p>The data type for a <code>String</code> parameter. Supported data types include plain text and Amazon Machine Image (AMI) IDs.</p>
/// <p><b>The following data type values are supported.</b></p>
/// <ul>
/// <li>
/// <p><code>text</code></p></li>
/// <li>
/// <p><code>aws:ec2:image</code></p></li>
/// <li>
/// <p><code>aws:ssm:integration</code></p></li>
/// </ul>
/// <p>When you create a <code>String</code> parameter and specify <code>aws:ec2:image</code>, Amazon Web Services Systems Manager validates the parameter value is in the required format, such as <code>ami-12345abcdeEXAMPLE</code>, and that the specified AMI is available in your Amazon Web Services account.</p><note>
/// <p>If the action is successful, the service sends back an HTTP 200 response which indicates a successful <code>PutParameter</code> call for all cases except for data type <code>aws:ec2:image</code>. If you call <code>PutParameter</code> with <code>aws:ec2:image</code> data type, a successful HTTP 200 response does not guarantee that your parameter was successfully created or updated. The <code>aws:ec2:image</code> value is validated asynchronously, and the <code>PutParameter</code> call returns before the validation is complete. If you submit an invalid AMI value, the PutParameter operation will return success, but the asynchronous validation will fail and the parameter will not be created or updated. To monitor whether your <code>aws:ec2:image</code> parameters are created successfully, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-cwe.html">Setting up notifications or trigger actions based on Parameter Store events</a>. For more information about AMI format validation , see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html">Native parameter support for Amazon Machine Image (AMI) IDs</a>.</p>
/// </note>
pub fn data_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.data_type = ::std::option::Option::Some(input.into());
self
}
/// <p>The data type for a <code>String</code> parameter. Supported data types include plain text and Amazon Machine Image (AMI) IDs.</p>
/// <p><b>The following data type values are supported.</b></p>
/// <ul>
/// <li>
/// <p><code>text</code></p></li>
/// <li>
/// <p><code>aws:ec2:image</code></p></li>
/// <li>
/// <p><code>aws:ssm:integration</code></p></li>
/// </ul>
/// <p>When you create a <code>String</code> parameter and specify <code>aws:ec2:image</code>, Amazon Web Services Systems Manager validates the parameter value is in the required format, such as <code>ami-12345abcdeEXAMPLE</code>, and that the specified AMI is available in your Amazon Web Services account.</p><note>
/// <p>If the action is successful, the service sends back an HTTP 200 response which indicates a successful <code>PutParameter</code> call for all cases except for data type <code>aws:ec2:image</code>. If you call <code>PutParameter</code> with <code>aws:ec2:image</code> data type, a successful HTTP 200 response does not guarantee that your parameter was successfully created or updated. The <code>aws:ec2:image</code> value is validated asynchronously, and the <code>PutParameter</code> call returns before the validation is complete. If you submit an invalid AMI value, the PutParameter operation will return success, but the asynchronous validation will fail and the parameter will not be created or updated. To monitor whether your <code>aws:ec2:image</code> parameters are created successfully, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-cwe.html">Setting up notifications or trigger actions based on Parameter Store events</a>. For more information about AMI format validation , see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html">Native parameter support for Amazon Machine Image (AMI) IDs</a>.</p>
/// </note>
pub fn set_data_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.data_type = input;
self
}
/// <p>The data type for a <code>String</code> parameter. Supported data types include plain text and Amazon Machine Image (AMI) IDs.</p>
/// <p><b>The following data type values are supported.</b></p>
/// <ul>
/// <li>
/// <p><code>text</code></p></li>
/// <li>
/// <p><code>aws:ec2:image</code></p></li>
/// <li>
/// <p><code>aws:ssm:integration</code></p></li>
/// </ul>
/// <p>When you create a <code>String</code> parameter and specify <code>aws:ec2:image</code>, Amazon Web Services Systems Manager validates the parameter value is in the required format, such as <code>ami-12345abcdeEXAMPLE</code>, and that the specified AMI is available in your Amazon Web Services account.</p><note>
/// <p>If the action is successful, the service sends back an HTTP 200 response which indicates a successful <code>PutParameter</code> call for all cases except for data type <code>aws:ec2:image</code>. If you call <code>PutParameter</code> with <code>aws:ec2:image</code> data type, a successful HTTP 200 response does not guarantee that your parameter was successfully created or updated. The <code>aws:ec2:image</code> value is validated asynchronously, and the <code>PutParameter</code> call returns before the validation is complete. If you submit an invalid AMI value, the PutParameter operation will return success, but the asynchronous validation will fail and the parameter will not be created or updated. To monitor whether your <code>aws:ec2:image</code> parameters are created successfully, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-paramstore-cwe.html">Setting up notifications or trigger actions based on Parameter Store events</a>. For more information about AMI format validation , see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-ec2-aliases.html">Native parameter support for Amazon Machine Image (AMI) IDs</a>.</p>
/// </note>
pub fn get_data_type(&self) -> &::std::option::Option<::std::string::String> {
&self.data_type
}
/// Consumes the builder and constructs a [`PutParameterInput`](crate::operation::put_parameter::PutParameterInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::put_parameter::PutParameterInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::put_parameter::PutParameterInput {
name: self.name,
description: self.description,
value: self.value,
r#type: self.r#type,
key_id: self.key_id,
overwrite: self.overwrite,
allowed_pattern: self.allowed_pattern,
tags: self.tags,
tier: self.tier,
policies: self.policies,
data_type: self.data_type,
})
}
}
impl ::std::fmt::Debug for PutParameterInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("PutParameterInputBuilder");
formatter.field("name", &self.name);
formatter.field("description", &self.description);
formatter.field("value", &"*** Sensitive Data Redacted ***");
formatter.field("r#type", &self.r#type);
formatter.field("key_id", &self.key_id);
formatter.field("overwrite", &self.overwrite);
formatter.field("allowed_pattern", &self.allowed_pattern);
formatter.field("tags", &self.tags);
formatter.field("tier", &self.tier);
formatter.field("policies", &self.policies);
formatter.field("data_type", &self.data_type);
formatter.finish()
}
}