@scaleway/sdk 2.5.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/account/v2/api.gen.js +26 -74
- package/dist/api/account/v3/api.gen.js +20 -60
- package/dist/api/applesilicon/v1alpha1/api.gen.js +16 -56
- package/dist/api/baremetal/v1/api.gen.js +36 -132
- package/dist/api/billing/v2alpha1/api.gen.js +17 -57
- package/dist/api/block/v1alpha1/api.gen.js +19 -67
- package/dist/api/block/v1alpha1/marshalling.gen.js +1 -0
- package/dist/api/cockpit/v1beta1/api.gen.js +95 -279
- package/dist/api/container/v1beta1/api.gen.js +51 -123
- package/dist/api/document_db/v1beta1/api.gen.js +18 -66
- package/dist/api/document_db/v1beta1/marshalling.gen.js +20 -1
- package/dist/api/domain/v2beta1/api.gen.js +36 -124
- package/dist/api/flexibleip/v1alpha1/api.gen.js +6 -22
- package/dist/api/function/v1beta1/api.gen.js +55 -135
- package/dist/api/iam/v1alpha1/api.gen.js +66 -226
- package/dist/api/instance/v1/api.gen.js +156 -325
- package/dist/api/instance/v1/api.utils.js +0 -126
- package/dist/api/instance/v1/marshalling.gen.js +99 -51
- package/dist/api/iot/v1/api.gen.js +24 -88
- package/dist/api/ipam/v1/api.gen.js +12 -28
- package/dist/api/ipfs/v1alpha1/api.gen.js +12 -44
- package/dist/api/jobs/v1alpha1/api.gen.js +13 -58
- package/dist/api/jobs/v1alpha1/marshalling.gen.js +2 -0
- package/dist/api/k8s/v1/api.gen.js +16 -56
- package/dist/api/k8s/v1/marshalling.gen.js +1 -0
- package/dist/api/lb/v1/api.gen.js +72 -248
- package/dist/api/marketplace/v1/api.gen.js +7 -31
- package/dist/api/marketplace/v1/marshalling.gen.js +1 -18
- package/dist/api/marketplace/v2/api.gen.js +21 -53
- package/dist/api/mnq/v1beta1/api.gen.js +76 -212
- package/dist/api/rdb/v1/api.gen.js +24 -88
- package/dist/api/rdb/v1/marshalling.gen.js +11 -1
- package/dist/api/redis/v1/api.gen.js +6 -22
- package/dist/api/registry/v1/api.gen.js +12 -44
- package/dist/api/secret/v1alpha1/api.gen.js +18 -66
- package/dist/api/serverless_sqldb/index.js +2 -0
- package/dist/api/serverless_sqldb/v1alpha1/api.gen.js +162 -0
- package/dist/api/serverless_sqldb/v1alpha1/content.gen.js +7 -0
- package/dist/api/serverless_sqldb/v1alpha1/index.gen.js +7 -0
- package/dist/api/serverless_sqldb/v1alpha1/marshalling.gen.js +77 -0
- package/dist/api/serverless_sqldb/v1alpha1/validation-rules.gen.js +60 -0
- package/dist/api/tem/v1alpha1/api.gen.js +17 -57
- package/dist/api/test/v1/api.gen.js +6 -22
- package/dist/api/vpc/v1/api.gen.js +12 -36
- package/dist/api/vpc/v2/api.gen.js +30 -86
- package/dist/api/vpcgw/v1/api.gen.js +46 -158
- package/dist/api/webhosting/v1alpha1/api.gen.js +12 -44
- package/dist/helpers/marshalling.js +8 -23
- package/dist/index.cjs +1066 -821
- package/dist/index.d.ts +2191 -1780
- package/dist/index.js +12 -10
- package/dist/internal/async/interval-retrier.js +8 -16
- package/dist/internal/interceptors/helpers.js +3 -4
- package/dist/internal/logger/console-logger.js +1 -7
- package/dist/internal/logger/index.js +1 -9
- package/dist/scw/auth.js +1 -2
- package/dist/scw/client.js +2 -10
- package/dist/scw/constants.js +1 -1
- package/dist/scw/errors/non-standard/invalid-request-mapper.js +5 -8
- package/dist/scw/errors/scw-error.js +2 -9
- package/dist/scw/errors/standard/permissions-denied-error.js +4 -7
- package/dist/scw/fetch/build-fetcher.js +1 -4
- package/dist/scw/fetch/http-dumper.js +1 -4
- package/dist/scw/fetch/http-interceptors.js +18 -31
- package/dist/scw/fetch/resource-paginator.js +3 -17
- package/package.json +2 -2
- package/dist/api/instance/v1/marshalling.utils.js +0 -63
|
@@ -24,33 +24,17 @@ class API extends API$1 {
|
|
|
24
24
|
* @param request - The request {@link CreateProjectRequest}
|
|
25
25
|
* @returns A Promise of Project
|
|
26
26
|
*/
|
|
27
|
-
createProject = (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}, unmarshalProject);
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
|
-
pageOfListProjects = (() => {
|
|
42
|
-
var _this2 = this;
|
|
43
|
-
return function (request) {
|
|
44
|
-
if (request === void 0) {
|
|
45
|
-
request = {};
|
|
46
|
-
}
|
|
47
|
-
return _this2.client.fetch({
|
|
48
|
-
method: 'GET',
|
|
49
|
-
path: `/account/v2/projects`,
|
|
50
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this2.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this2.client.settings.defaultPageSize], ['project_ids', request.projectIds])
|
|
51
|
-
}, unmarshalListProjectsResponse);
|
|
52
|
-
};
|
|
53
|
-
})();
|
|
27
|
+
createProject = (request = {}) => this.client.fetch({
|
|
28
|
+
body: JSON.stringify(marshalCreateProjectRequest(request, this.client.settings)),
|
|
29
|
+
headers: jsonContentHeaders,
|
|
30
|
+
method: 'POST',
|
|
31
|
+
path: `/account/v2/projects`
|
|
32
|
+
}, unmarshalProject);
|
|
33
|
+
pageOfListProjects = (request = {}) => this.client.fetch({
|
|
34
|
+
method: 'GET',
|
|
35
|
+
path: `/account/v2/projects`,
|
|
36
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_ids', request.projectIds])
|
|
37
|
+
}, unmarshalListProjectsResponse);
|
|
54
38
|
|
|
55
39
|
/**
|
|
56
40
|
* List all Projects of an Organization. Deprecated in favor of Account API
|
|
@@ -63,15 +47,7 @@ class API extends API$1 {
|
|
|
63
47
|
* @param request - The request {@link ListProjectsRequest}
|
|
64
48
|
* @returns A Promise of ListProjectsResponse
|
|
65
49
|
*/
|
|
66
|
-
listProjects = (
|
|
67
|
-
var _this3 = this;
|
|
68
|
-
return function (request) {
|
|
69
|
-
if (request === void 0) {
|
|
70
|
-
request = {};
|
|
71
|
-
}
|
|
72
|
-
return enrichForPagination('projects', _this3.pageOfListProjects, request);
|
|
73
|
-
};
|
|
74
|
-
})();
|
|
50
|
+
listProjects = (request = {}) => enrichForPagination('projects', this.pageOfListProjects, request);
|
|
75
51
|
|
|
76
52
|
/**
|
|
77
53
|
* Get an existing Project. Deprecated in favor of Account API v3. Retrieve
|
|
@@ -83,18 +59,10 @@ class API extends API$1 {
|
|
|
83
59
|
* @param request - The request {@link GetProjectRequest}
|
|
84
60
|
* @returns A Promise of Project
|
|
85
61
|
*/
|
|
86
|
-
getProject = (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
request = {};
|
|
91
|
-
}
|
|
92
|
-
return _this4.client.fetch({
|
|
93
|
-
method: 'GET',
|
|
94
|
-
path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? _this4.client.settings.defaultProjectId)}`
|
|
95
|
-
}, unmarshalProject);
|
|
96
|
-
};
|
|
97
|
-
})();
|
|
62
|
+
getProject = (request = {}) => this.client.fetch({
|
|
63
|
+
method: 'GET',
|
|
64
|
+
path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
65
|
+
}, unmarshalProject);
|
|
98
66
|
|
|
99
67
|
/**
|
|
100
68
|
* Delete an existing Project. Deprecated in favor of Account API v3. Delete
|
|
@@ -106,18 +74,10 @@ class API extends API$1 {
|
|
|
106
74
|
* @deprecated
|
|
107
75
|
* @param request - The request {@link DeleteProjectRequest}
|
|
108
76
|
*/
|
|
109
|
-
deleteProject = (
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
request = {};
|
|
114
|
-
}
|
|
115
|
-
return _this5.client.fetch({
|
|
116
|
-
method: 'DELETE',
|
|
117
|
-
path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? _this5.client.settings.defaultProjectId)}`
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
})();
|
|
77
|
+
deleteProject = (request = {}) => this.client.fetch({
|
|
78
|
+
method: 'DELETE',
|
|
79
|
+
path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
80
|
+
});
|
|
121
81
|
|
|
122
82
|
/**
|
|
123
83
|
* Update Project. Deprecated in favor of Account API v3. Update the
|
|
@@ -128,20 +88,12 @@ class API extends API$1 {
|
|
|
128
88
|
* @param request - The request {@link UpdateProjectRequest}
|
|
129
89
|
* @returns A Promise of Project
|
|
130
90
|
*/
|
|
131
|
-
updateProject = (
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return _this6.client.fetch({
|
|
138
|
-
body: JSON.stringify(marshalUpdateProjectRequest(request, _this6.client.settings)),
|
|
139
|
-
headers: jsonContentHeaders,
|
|
140
|
-
method: 'PATCH',
|
|
141
|
-
path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? _this6.client.settings.defaultProjectId)}`
|
|
142
|
-
}, unmarshalProject);
|
|
143
|
-
};
|
|
144
|
-
})();
|
|
91
|
+
updateProject = (request = {}) => this.client.fetch({
|
|
92
|
+
body: JSON.stringify(marshalUpdateProjectRequest(request, this.client.settings)),
|
|
93
|
+
headers: jsonContentHeaders,
|
|
94
|
+
method: 'PATCH',
|
|
95
|
+
path: `/account/v2/projects/${validatePathParam('projectId', request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
96
|
+
}, unmarshalProject);
|
|
145
97
|
}
|
|
146
98
|
|
|
147
99
|
export { API };
|
|
@@ -28,19 +28,11 @@ class ProjectAPI extends API$1 {
|
|
|
28
28
|
method: 'POST',
|
|
29
29
|
path: `/account/v3/projects`
|
|
30
30
|
}, unmarshalProject);
|
|
31
|
-
pageOfListProjects = (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
return _this.client.fetch({
|
|
38
|
-
method: 'GET',
|
|
39
|
-
path: `/account/v3/projects`,
|
|
40
|
-
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? _this.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_ids', request.projectIds])
|
|
41
|
-
}, unmarshalListProjectsResponse);
|
|
42
|
-
};
|
|
43
|
-
})();
|
|
31
|
+
pageOfListProjects = (request = {}) => this.client.fetch({
|
|
32
|
+
method: 'GET',
|
|
33
|
+
path: `/account/v3/projects`,
|
|
34
|
+
urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId ?? this.client.settings.defaultOrganizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_ids', request.projectIds])
|
|
35
|
+
}, unmarshalListProjectsResponse);
|
|
44
36
|
|
|
45
37
|
/**
|
|
46
38
|
* List all Projects of an Organization. List all Projects of an Organization.
|
|
@@ -51,15 +43,7 @@ class ProjectAPI extends API$1 {
|
|
|
51
43
|
* @param request - The request {@link ProjectApiListProjectsRequest}
|
|
52
44
|
* @returns A Promise of ListProjectsResponse
|
|
53
45
|
*/
|
|
54
|
-
listProjects = (
|
|
55
|
-
var _this2 = this;
|
|
56
|
-
return function (request) {
|
|
57
|
-
if (request === void 0) {
|
|
58
|
-
request = {};
|
|
59
|
-
}
|
|
60
|
-
return enrichForPagination('projects', _this2.pageOfListProjects, request);
|
|
61
|
-
};
|
|
62
|
-
})();
|
|
46
|
+
listProjects = (request = {}) => enrichForPagination('projects', this.pageOfListProjects, request);
|
|
63
47
|
|
|
64
48
|
/**
|
|
65
49
|
* Get an existing Project. Retrieve information about an existing Project,
|
|
@@ -69,18 +53,10 @@ class ProjectAPI extends API$1 {
|
|
|
69
53
|
* @param request - The request {@link ProjectApiGetProjectRequest}
|
|
70
54
|
* @returns A Promise of Project
|
|
71
55
|
*/
|
|
72
|
-
getProject = (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
request = {};
|
|
77
|
-
}
|
|
78
|
-
return _this3.client.fetch({
|
|
79
|
-
method: 'GET',
|
|
80
|
-
path: `/account/v3/projects/${validatePathParam('projectId', request.projectId ?? _this3.client.settings.defaultProjectId)}`
|
|
81
|
-
}, unmarshalProject);
|
|
82
|
-
};
|
|
83
|
-
})();
|
|
56
|
+
getProject = (request = {}) => this.client.fetch({
|
|
57
|
+
method: 'GET',
|
|
58
|
+
path: `/account/v3/projects/${validatePathParam('projectId', request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
59
|
+
}, unmarshalProject);
|
|
84
60
|
|
|
85
61
|
/**
|
|
86
62
|
* Delete an existing Project. Delete an existing Project, specified by its
|
|
@@ -90,18 +66,10 @@ class ProjectAPI extends API$1 {
|
|
|
90
66
|
*
|
|
91
67
|
* @param request - The request {@link ProjectApiDeleteProjectRequest}
|
|
92
68
|
*/
|
|
93
|
-
deleteProject = (
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
request = {};
|
|
98
|
-
}
|
|
99
|
-
return _this4.client.fetch({
|
|
100
|
-
method: 'DELETE',
|
|
101
|
-
path: `/account/v3/projects/${validatePathParam('projectId', request.projectId ?? _this4.client.settings.defaultProjectId)}`
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
})();
|
|
69
|
+
deleteProject = (request = {}) => this.client.fetch({
|
|
70
|
+
method: 'DELETE',
|
|
71
|
+
path: `/account/v3/projects/${validatePathParam('projectId', request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
72
|
+
});
|
|
105
73
|
|
|
106
74
|
/**
|
|
107
75
|
* Update Project. Update the parameters of an existing Project, specified by
|
|
@@ -110,20 +78,12 @@ class ProjectAPI extends API$1 {
|
|
|
110
78
|
* @param request - The request {@link ProjectApiUpdateProjectRequest}
|
|
111
79
|
* @returns A Promise of Project
|
|
112
80
|
*/
|
|
113
|
-
updateProject = (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return _this5.client.fetch({
|
|
120
|
-
body: JSON.stringify(marshalProjectApiUpdateProjectRequest(request, _this5.client.settings)),
|
|
121
|
-
headers: jsonContentHeaders,
|
|
122
|
-
method: 'PATCH',
|
|
123
|
-
path: `/account/v3/projects/${validatePathParam('projectId', request.projectId ?? _this5.client.settings.defaultProjectId)}`
|
|
124
|
-
}, unmarshalProject);
|
|
125
|
-
};
|
|
126
|
-
})();
|
|
81
|
+
updateProject = (request = {}) => this.client.fetch({
|
|
82
|
+
body: JSON.stringify(marshalProjectApiUpdateProjectRequest(request, this.client.settings)),
|
|
83
|
+
headers: jsonContentHeaders,
|
|
84
|
+
method: 'PATCH',
|
|
85
|
+
path: `/account/v3/projects/${validatePathParam('projectId', request.projectId ?? this.client.settings.defaultProjectId)}`
|
|
86
|
+
}, unmarshalProject);
|
|
127
87
|
}
|
|
128
88
|
|
|
129
89
|
export { ProjectAPI };
|
|
@@ -24,18 +24,10 @@ class API extends API$1 {
|
|
|
24
24
|
* @param request - The request {@link ListServerTypesRequest}
|
|
25
25
|
* @returns A Promise of ListServerTypesResponse
|
|
26
26
|
*/
|
|
27
|
-
listServerTypes = (
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
request = {};
|
|
32
|
-
}
|
|
33
|
-
return _this.client.fetch({
|
|
34
|
-
method: 'GET',
|
|
35
|
-
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/server-types`
|
|
36
|
-
}, unmarshalListServerTypesResponse);
|
|
37
|
-
};
|
|
38
|
-
})();
|
|
27
|
+
listServerTypes = (request = {}) => this.client.fetch({
|
|
28
|
+
method: 'GET',
|
|
29
|
+
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/server-types`
|
|
30
|
+
}, unmarshalListServerTypesResponse);
|
|
39
31
|
|
|
40
32
|
/**
|
|
41
33
|
* Get a server type. Get technical details (CPU, disk size etc.) of a server
|
|
@@ -62,19 +54,11 @@ class API extends API$1 {
|
|
|
62
54
|
method: 'POST',
|
|
63
55
|
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`
|
|
64
56
|
}, unmarshalServer);
|
|
65
|
-
pageOfListServers = (
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
return _this2.client.fetch({
|
|
72
|
-
method: 'GET',
|
|
73
|
-
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? _this2.client.settings.defaultZone)}/servers`,
|
|
74
|
-
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this2.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
75
|
-
}, unmarshalListServersResponse);
|
|
76
|
-
};
|
|
77
|
-
})();
|
|
57
|
+
pageOfListServers = (request = {}) => this.client.fetch({
|
|
58
|
+
method: 'GET',
|
|
59
|
+
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`,
|
|
60
|
+
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
|
|
61
|
+
}, unmarshalListServersResponse);
|
|
78
62
|
|
|
79
63
|
/**
|
|
80
64
|
* List all servers. List all servers in the specified zone. By default,
|
|
@@ -84,28 +68,12 @@ class API extends API$1 {
|
|
|
84
68
|
* @param request - The request {@link ListServersRequest}
|
|
85
69
|
* @returns A Promise of ListServersResponse
|
|
86
70
|
*/
|
|
87
|
-
listServers = (
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return enrichForPagination('servers', _this3.pageOfListServers, request);
|
|
94
|
-
};
|
|
95
|
-
})();
|
|
96
|
-
pageOfListOS = (() => {
|
|
97
|
-
var _this4 = this;
|
|
98
|
-
return function (request) {
|
|
99
|
-
if (request === void 0) {
|
|
100
|
-
request = {};
|
|
101
|
-
}
|
|
102
|
-
return _this4.client.fetch({
|
|
103
|
-
method: 'GET',
|
|
104
|
-
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? _this4.client.settings.defaultZone)}/os`,
|
|
105
|
-
urlParams: urlParams(['name', request.name], ['page', request.page], ['page_size', request.pageSize ?? _this4.client.settings.defaultPageSize], ['server_type', request.serverType])
|
|
106
|
-
}, unmarshalListOSResponse);
|
|
107
|
-
};
|
|
108
|
-
})();
|
|
71
|
+
listServers = (request = {}) => enrichForPagination('servers', this.pageOfListServers, request);
|
|
72
|
+
pageOfListOS = (request = {}) => this.client.fetch({
|
|
73
|
+
method: 'GET',
|
|
74
|
+
path: `/apple-silicon/v1alpha1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/os`,
|
|
75
|
+
urlParams: urlParams(['name', request.name], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['server_type', request.serverType])
|
|
76
|
+
}, unmarshalListOSResponse);
|
|
109
77
|
|
|
110
78
|
/**
|
|
111
79
|
* List all Operating Systems (OS). List all Operating Systems (OS). The
|
|
@@ -115,15 +83,7 @@ class API extends API$1 {
|
|
|
115
83
|
* @param request - The request {@link ListOSRequest}
|
|
116
84
|
* @returns A Promise of ListOSResponse
|
|
117
85
|
*/
|
|
118
|
-
listOS = (
|
|
119
|
-
var _this5 = this;
|
|
120
|
-
return function (request) {
|
|
121
|
-
if (request === void 0) {
|
|
122
|
-
request = {};
|
|
123
|
-
}
|
|
124
|
-
return enrichForPagination('os', _this5.pageOfListOS, request);
|
|
125
|
-
};
|
|
126
|
-
})();
|
|
86
|
+
listOS = (request = {}) => enrichForPagination('os', this.pageOfListOS, request);
|
|
127
87
|
|
|
128
88
|
/**
|
|
129
89
|
* Get an Operating System (OS). Get an Operating System (OS). The response
|
|
@@ -19,19 +19,11 @@ const jsonContentHeaders = {
|
|
|
19
19
|
class API extends API$1 {
|
|
20
20
|
/** Lists the available zones of the API. */
|
|
21
21
|
static LOCALITIES = ['fr-par-1', 'fr-par-2', 'nl-ams-1', 'nl-ams-2'];
|
|
22
|
-
pageOfListServers = (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
return _this.client.fetch({
|
|
29
|
-
method: 'GET',
|
|
30
|
-
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? _this.client.settings.defaultZone)}/servers`,
|
|
31
|
-
urlParams: urlParams(['name', request.name], ['option_id', request.optionId], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId], ['status', request.status], ['tags', request.tags])
|
|
32
|
-
}, unmarshalListServersResponse);
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
22
|
+
pageOfListServers = (request = {}) => this.client.fetch({
|
|
23
|
+
method: 'GET',
|
|
24
|
+
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers`,
|
|
25
|
+
urlParams: urlParams(['name', request.name], ['option_id', request.optionId], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId], ['status', request.status], ['tags', request.tags])
|
|
26
|
+
}, unmarshalListServersResponse);
|
|
35
27
|
|
|
36
28
|
/**
|
|
37
29
|
* List Elastic Metal servers for an Organization. List Elastic Metal servers
|
|
@@ -40,15 +32,7 @@ class API extends API$1 {
|
|
|
40
32
|
* @param request - The request {@link ListServersRequest}
|
|
41
33
|
* @returns A Promise of ListServersResponse
|
|
42
34
|
*/
|
|
43
|
-
listServers = (
|
|
44
|
-
var _this2 = this;
|
|
45
|
-
return function (request) {
|
|
46
|
-
if (request === void 0) {
|
|
47
|
-
request = {};
|
|
48
|
-
}
|
|
49
|
-
return enrichForPagination('servers', _this2.pageOfListServers, request);
|
|
50
|
-
};
|
|
51
|
-
})();
|
|
35
|
+
listServers = (request = {}) => enrichForPagination('servers', this.pageOfListServers, request);
|
|
52
36
|
|
|
53
37
|
/**
|
|
54
38
|
* Get a specific Elastic Metal server. Get full details of an existing
|
|
@@ -280,19 +264,11 @@ class API extends API$1 {
|
|
|
280
264
|
method: 'DELETE',
|
|
281
265
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/options/${validatePathParam('optionId', request.optionId)}`
|
|
282
266
|
}, unmarshalServer);
|
|
283
|
-
pageOfListOffers = (
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
return _this3.client.fetch({
|
|
290
|
-
method: 'GET',
|
|
291
|
-
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? _this3.client.settings.defaultZone)}/offers`,
|
|
292
|
-
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? _this3.client.settings.defaultPageSize], ['subscription_period', request.subscriptionPeriod])
|
|
293
|
-
}, unmarshalListOffersResponse);
|
|
294
|
-
};
|
|
295
|
-
})();
|
|
267
|
+
pageOfListOffers = (request = {}) => this.client.fetch({
|
|
268
|
+
method: 'GET',
|
|
269
|
+
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/offers`,
|
|
270
|
+
urlParams: urlParams(['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['subscription_period', request.subscriptionPeriod])
|
|
271
|
+
}, unmarshalListOffersResponse);
|
|
296
272
|
|
|
297
273
|
/**
|
|
298
274
|
* List offers. List all available Elastic Metal server configurations.
|
|
@@ -300,15 +276,7 @@ class API extends API$1 {
|
|
|
300
276
|
* @param request - The request {@link ListOffersRequest}
|
|
301
277
|
* @returns A Promise of ListOffersResponse
|
|
302
278
|
*/
|
|
303
|
-
listOffers = (
|
|
304
|
-
var _this4 = this;
|
|
305
|
-
return function (request) {
|
|
306
|
-
if (request === void 0) {
|
|
307
|
-
request = {};
|
|
308
|
-
}
|
|
309
|
-
return enrichForPagination('offers', _this4.pageOfListOffers, request);
|
|
310
|
-
};
|
|
311
|
-
})();
|
|
279
|
+
listOffers = (request = {}) => enrichForPagination('offers', this.pageOfListOffers, request);
|
|
312
280
|
|
|
313
281
|
/**
|
|
314
282
|
* Get offer. Get details of an offer identified by its offer ID.
|
|
@@ -331,19 +299,11 @@ class API extends API$1 {
|
|
|
331
299
|
method: 'GET',
|
|
332
300
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/options/${validatePathParam('optionId', request.optionId)}`
|
|
333
301
|
}, unmarshalOption);
|
|
334
|
-
pageOfListOptions = (
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
return _this5.client.fetch({
|
|
341
|
-
method: 'GET',
|
|
342
|
-
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? _this5.client.settings.defaultZone)}/options`,
|
|
343
|
-
urlParams: urlParams(['name', request.name], ['offer_id', request.offerId], ['page', request.page], ['page_size', request.pageSize ?? _this5.client.settings.defaultPageSize])
|
|
344
|
-
}, unmarshalListOptionsResponse);
|
|
345
|
-
};
|
|
346
|
-
})();
|
|
302
|
+
pageOfListOptions = (request = {}) => this.client.fetch({
|
|
303
|
+
method: 'GET',
|
|
304
|
+
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/options`,
|
|
305
|
+
urlParams: urlParams(['name', request.name], ['offer_id', request.offerId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
306
|
+
}, unmarshalListOptionsResponse);
|
|
347
307
|
|
|
348
308
|
/**
|
|
349
309
|
* List options. List all options matching with filters.
|
|
@@ -351,28 +311,12 @@ class API extends API$1 {
|
|
|
351
311
|
* @param request - The request {@link ListOptionsRequest}
|
|
352
312
|
* @returns A Promise of ListOptionsResponse
|
|
353
313
|
*/
|
|
354
|
-
listOptions = (
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
return enrichForPagination('options', _this6.pageOfListOptions, request);
|
|
361
|
-
};
|
|
362
|
-
})();
|
|
363
|
-
pageOfListSettings = (() => {
|
|
364
|
-
var _this7 = this;
|
|
365
|
-
return function (request) {
|
|
366
|
-
if (request === void 0) {
|
|
367
|
-
request = {};
|
|
368
|
-
}
|
|
369
|
-
return _this7.client.fetch({
|
|
370
|
-
method: 'GET',
|
|
371
|
-
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? _this7.client.settings.defaultZone)}/settings`,
|
|
372
|
-
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this7.client.settings.defaultPageSize], ['project_id', request.projectId ?? _this7.client.settings.defaultProjectId])
|
|
373
|
-
}, unmarshalListSettingsResponse);
|
|
374
|
-
};
|
|
375
|
-
})();
|
|
314
|
+
listOptions = (request = {}) => enrichForPagination('options', this.pageOfListOptions, request);
|
|
315
|
+
pageOfListSettings = (request = {}) => this.client.fetch({
|
|
316
|
+
method: 'GET',
|
|
317
|
+
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/settings`,
|
|
318
|
+
urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId ?? this.client.settings.defaultProjectId])
|
|
319
|
+
}, unmarshalListSettingsResponse);
|
|
376
320
|
|
|
377
321
|
/**
|
|
378
322
|
* List all settings. Return all settings for a Project ID.
|
|
@@ -380,15 +324,7 @@ class API extends API$1 {
|
|
|
380
324
|
* @param request - The request {@link ListSettingsRequest}
|
|
381
325
|
* @returns A Promise of ListSettingsResponse
|
|
382
326
|
*/
|
|
383
|
-
listSettings = (
|
|
384
|
-
var _this8 = this;
|
|
385
|
-
return function (request) {
|
|
386
|
-
if (request === void 0) {
|
|
387
|
-
request = {};
|
|
388
|
-
}
|
|
389
|
-
return enrichForPagination('settings', _this8.pageOfListSettings, request);
|
|
390
|
-
};
|
|
391
|
-
})();
|
|
327
|
+
listSettings = (request = {}) => enrichForPagination('settings', this.pageOfListSettings, request);
|
|
392
328
|
|
|
393
329
|
/**
|
|
394
330
|
* Update setting. Update a setting for a Project ID (enable or disable).
|
|
@@ -402,19 +338,11 @@ class API extends API$1 {
|
|
|
402
338
|
method: 'PATCH',
|
|
403
339
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/settings/${validatePathParam('settingId', request.settingId)}`
|
|
404
340
|
}, unmarshalSetting);
|
|
405
|
-
pageOfListOS = (
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}
|
|
411
|
-
return _this9.client.fetch({
|
|
412
|
-
method: 'GET',
|
|
413
|
-
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? _this9.client.settings.defaultZone)}/os`,
|
|
414
|
-
urlParams: urlParams(['offer_id', request.offerId], ['page', request.page], ['page_size', request.pageSize ?? _this9.client.settings.defaultPageSize])
|
|
415
|
-
}, unmarshalListOSResponse);
|
|
416
|
-
};
|
|
417
|
-
})();
|
|
341
|
+
pageOfListOS = (request = {}) => this.client.fetch({
|
|
342
|
+
method: 'GET',
|
|
343
|
+
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/os`,
|
|
344
|
+
urlParams: urlParams(['offer_id', request.offerId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
|
|
345
|
+
}, unmarshalListOSResponse);
|
|
418
346
|
|
|
419
347
|
/**
|
|
420
348
|
* List available OSes. List all OSes that are available for installation on
|
|
@@ -423,15 +351,7 @@ class API extends API$1 {
|
|
|
423
351
|
* @param request - The request {@link ListOSRequest}
|
|
424
352
|
* @returns A Promise of ListOSResponse
|
|
425
353
|
*/
|
|
426
|
-
listOS = (
|
|
427
|
-
var _this10 = this;
|
|
428
|
-
return function (request) {
|
|
429
|
-
if (request === void 0) {
|
|
430
|
-
request = {};
|
|
431
|
-
}
|
|
432
|
-
return enrichForPagination('os', _this10.pageOfListOS, request);
|
|
433
|
-
};
|
|
434
|
-
})();
|
|
354
|
+
listOS = (request = {}) => enrichForPagination('os', this.pageOfListOS, request);
|
|
435
355
|
|
|
436
356
|
/**
|
|
437
357
|
* Get OS with an ID. Return the specific OS for the ID.
|
|
@@ -477,19 +397,11 @@ class PrivateNetworkAPI extends API$1 {
|
|
|
477
397
|
method: 'PUT',
|
|
478
398
|
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/servers/${validatePathParam('serverId', request.serverId)}/private-networks`
|
|
479
399
|
}, unmarshalSetServerPrivateNetworksResponse);
|
|
480
|
-
pageOfListServerPrivateNetworks = (
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
}
|
|
486
|
-
return _this11.client.fetch({
|
|
487
|
-
method: 'GET',
|
|
488
|
-
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? _this11.client.settings.defaultZone)}/server-private-networks`,
|
|
489
|
-
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this11.client.settings.defaultPageSize], ['private_network_id', request.privateNetworkId], ['project_id', request.projectId], ['server_id', request.serverId])
|
|
490
|
-
}, unmarshalListServerPrivateNetworksResponse);
|
|
491
|
-
};
|
|
492
|
-
})();
|
|
400
|
+
pageOfListServerPrivateNetworks = (request = {}) => this.client.fetch({
|
|
401
|
+
method: 'GET',
|
|
402
|
+
path: `/baremetal/v1/zones/${validatePathParam('zone', request.zone ?? this.client.settings.defaultZone)}/server-private-networks`,
|
|
403
|
+
urlParams: urlParams(['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['private_network_id', request.privateNetworkId], ['project_id', request.projectId], ['server_id', request.serverId])
|
|
404
|
+
}, unmarshalListServerPrivateNetworksResponse);
|
|
493
405
|
|
|
494
406
|
/**
|
|
495
407
|
* List the Private Networks of a server.
|
|
@@ -498,15 +410,7 @@ class PrivateNetworkAPI extends API$1 {
|
|
|
498
410
|
* {@link PrivateNetworkApiListServerPrivateNetworksRequest}
|
|
499
411
|
* @returns A Promise of ListServerPrivateNetworksResponse
|
|
500
412
|
*/
|
|
501
|
-
listServerPrivateNetworks = (
|
|
502
|
-
var _this12 = this;
|
|
503
|
-
return function (request) {
|
|
504
|
-
if (request === void 0) {
|
|
505
|
-
request = {};
|
|
506
|
-
}
|
|
507
|
-
return enrichForPagination('serverPrivateNetworks', _this12.pageOfListServerPrivateNetworks, request);
|
|
508
|
-
};
|
|
509
|
-
})();
|
|
413
|
+
listServerPrivateNetworks = (request = {}) => enrichForPagination('serverPrivateNetworks', this.pageOfListServerPrivateNetworks, request);
|
|
510
414
|
|
|
511
415
|
/**
|
|
512
416
|
* Delete a Private Network.
|