Files
threshold-ui/addons/api/addon/generated/models/host-set.js
T

116 lines
2.5 KiB
JavaScript
Raw Normal View History

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
2020-08-13 17:05:09 -04:00
import BaseModel from '../../models/base';
import { attr } from '@ember-data/model';
/**
* HostSet is a collection of Hosts created and managed by a HostCatalog
*/
export default class GeneratedHostSetModel extends BaseModel {
// =attributes
@attr('string', {
2020-08-19 18:38:18 -04:00
description: 'The type of the resource, to help differentiate schemas',
2020-09-16 14:29:02 -04:00
readOnly: true,
})
type;
2020-08-13 17:05:09 -04:00
2020-08-27 16:38:49 -04:00
@attr('string', {
description: 'The owning host catalog ID.',
2020-09-16 14:29:02 -04:00
})
host_catalog_id;
2020-08-27 16:38:49 -04:00
2020-08-13 17:05:09 -04:00
@attr('string', {
2020-09-16 14:29:02 -04:00
description: 'Optional name for identification purposes',
})
name;
2020-08-13 17:05:09 -04:00
@attr('string', {
2020-09-16 14:29:02 -04:00
description: 'Optional user-set description for identification purposes',
})
description;
2020-08-13 17:05:09 -04:00
@attr('date', {
description: 'The time this resource was created\nOutput only.',
2020-09-16 14:29:02 -04:00
readOnly: true,
})
created_time;
2020-08-13 17:05:09 -04:00
@attr('date', {
description: 'The time this resource was last updated\nOutput only.',
2020-09-16 14:29:02 -04:00
readOnly: true,
})
updated_time;
2020-08-13 17:05:09 -04:00
@attr('number', {
description: 'Current version number of this resource.',
})
version;
@attr('number', {
2020-08-19 18:38:18 -04:00
description: 'The total count of hosts in this host set\nOutput only.',
2020-09-16 14:29:02 -04:00
readOnly: true,
})
size;
2022-01-26 07:56:36 -08:00
@attr({
description: 'Plugin information for this resource',
readOnly: true,
})
plugin;
@attr('number', {
2025-01-10 14:06:31 -05:00
for: {
type: 'plugin',
name: ['aws', 'azure', 'gcp'],
},
description:
"The number of seconds between the time boundary syncs the hosts in this set using this host set's plugin. If not provided a system determined default is used",
})
sync_interval_seconds;
2022-11-21 19:07:46 -05:00
/**
* Host IDs are read-only under normal circumstances. But these can
* be persisted via a dedicated call to `addHosts()`.
*/
@attr({
readOnly: true,
emptyArrayIfMissing: true,
})
host_ids;
@attr('string-array', {
2025-01-10 14:06:31 -05:00
for: {
type: 'plugin',
name: ['aws', 'azure', 'gcp'],
},
2022-11-21 19:07:46 -05:00
emptyArrayIfMissing: true,
trimWhitespace: true,
2022-11-21 19:07:46 -05:00
})
preferred_endpoints;
// AWS & GCP specific
2022-11-21 19:07:46 -05:00
@attr('string-array', {
2025-01-10 14:06:31 -05:00
for: {
type: 'plugin',
name: ['aws', 'gcp'],
},
2022-11-21 19:07:46 -05:00
isNestedAttribute: true,
emptyArrayIfMissing: true,
})
filters;
2022-12-02 13:44:11 -05:00
// Azure specific, comes in from API as "filter". This is to avoid collisions with filter
@attr('string', {
2025-01-10 14:06:31 -05:00
for: {
type: 'plugin',
name: 'azure',
},
description: '',
isNestedAttribute: true,
})
2022-12-02 13:44:11 -05:00
filter_string;
2020-08-13 17:05:09 -04:00
}