Sha256: 92a988310b617601011da372d95f8e838cbcf78a9533e43a933b6345c3d323e6
Contents?: true
Size: 1.04 KB
Versions: 4
Compression:
Stored size: 1.04 KB
Contents
require 'fog/huaweicloud/models/model' require 'uri' module Fog module KeyManager class HuaweiCloud class Secret < Fog::HuaweiCloud::Model identity :secret_ref # create attribute :uuid attribute :name attribute :expiration attribute :bit_length, type: Integer attribute :algorithm attribute :mode attribute :secret_type attribute :content_types attribute :created attribute :creator_id attribute :status attribute :updated attribute :payload attribute :payload_content_type attribute :payload_content_encoding attribute :metadata def uuid URI(self.secret_ref).path.split('/').last rescue nil end def create merge_attributes(service.create_secret(attributes).body) self end def destroy requires :secret_ref service.delete_secret(uuid) true end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems