| Total Complexity | 7 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | module Awspec::Type |
||
| 2 | class SsmParameter < ResourceBase |
||
| 3 | def initialize(name) |
||
| 4 | super |
||
| 5 | @display_name = name |
||
| 6 | end |
||
| 7 | |||
| 8 | def resource_via_client |
||
| 9 | @resource_via_client ||= find_ssm_parameter(@display_name) |
||
| 10 | end |
||
| 11 | |||
| 12 | def id |
||
| 13 | @id ||= @display_name if resource_via_client |
||
| 14 | end |
||
| 15 | |||
| 16 | def encrypted? |
||
| 17 | resource_via_client.type.eql? 'SecureString' |
||
| 18 | end |
||
| 19 | |||
| 20 | def has_tag?(key, value) |
||
| 21 | tag = find_parameter_tag(id, key) |
||
| 22 | return nil if tag.value != value |
||
| 23 | tag |
||
| 24 | end |
||
| 25 | end |
||
| 26 | end |
||
| 27 |