Method: ATSD::EntityGroupsService#create_or_replace
- Defined in:
- lib/atsd/services/entity_groups_service.rb
#create_or_replace(entity_group) ⇒ self
Note:
If only a subset of fields is provided for an existing entity group, the remaining properties and tags will be deleted.
Create an entity group with specified properties and tags or replace an existing entity group. This method creates a new entity group or replaces an existing entity group.
44 45 46 47 48 49 |
# File 'lib/atsd/services/entity_groups_service.rb', line 44 def create_or_replace(entity_group) entity_group = EntityGroup.new(name: entity_group) if entity_group.is_a? String entity_group = EntityGroup.new(entity_group) if entity_group.is_a? Hash @client.entity_groups_create_or_replace(entity_group.name, entity_group.to_request_hash) self end |