ibm-code-engine-sdk 4.9.0__tar.gz → 4.14.1__tar.gz
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.
- {ibm_code_engine_sdk-4.9.0/ibm_code_engine_sdk.egg-info → ibm_code_engine_sdk-4.14.1}/PKG-INFO +8 -7
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/README.md +5 -5
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk/code_engine_v2.py +401 -57
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk/version.py +1 -1
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1/ibm_code_engine_sdk.egg-info}/PKG-INFO +8 -7
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk.egg-info/requires.txt +1 -1
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/requirements-dev.txt +1 -1
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/requirements.txt +1 -1
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/setup.py +2 -1
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/LICENSE +0 -0
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/MANIFEST.in +0 -0
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk/__init__.py +0 -0
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk/common.py +0 -0
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk/ibm_cloud_code_engine_v1.py +0 -0
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk.egg-info/SOURCES.txt +0 -0
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk.egg-info/dependency_links.txt +0 -0
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk.egg-info/top_level.txt +0 -0
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk.egg-info/zip-safe +0 -0
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/pyproject.toml +0 -0
- {ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/setup.cfg +0 -0
{ibm_code_engine_sdk-4.9.0/ibm_code_engine_sdk.egg-info → ibm_code_engine_sdk-4.14.1}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: ibm-code-engine-sdk
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.14.1
|
|
4
4
|
Summary: Python SDK for IBM Cloud Code Engine
|
|
5
5
|
Home-page: https://github.com/IBM/code-engine-python-sdk
|
|
6
6
|
Author: IBM
|
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
17
|
Classifier: Development Status :: 5 - Production/Stable
|
|
17
18
|
Classifier: Intended Audience :: Developers
|
|
18
19
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -22,7 +23,7 @@ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
|
22
23
|
Description-Content-Type: text/markdown
|
|
23
24
|
License-File: LICENSE
|
|
24
25
|
Requires-Dist: requests<3.0.0,>=2.32.0
|
|
25
|
-
Requires-Dist: urllib3<2.
|
|
26
|
+
Requires-Dist: urllib3<2.4.0,>=2.3.0
|
|
26
27
|
Requires-Dist: python_dateutil<3.0.0,>=2.5.3
|
|
27
28
|
Requires-Dist: ibm_cloud_sdk_core<4.0.0,>=3.16.0
|
|
28
29
|
Dynamic: author
|
|
@@ -40,7 +41,7 @@ Dynamic: summary
|
|
|
40
41
|
<!--
|
|
41
42
|
[](https://github.com/semantic-release/semantic-release)
|
|
42
43
|
-->
|
|
43
|
-
# Python SDK for IBM Cloud Code Engine 4.
|
|
44
|
+
# Python SDK for IBM Cloud Code Engine 4.14.1
|
|
44
45
|
|
|
45
46
|
Python client library to interact with the [IBM Cloud Code Engine API](https://cloud.ibm.com/apidocs/codeengine).
|
|
46
47
|
|
|
@@ -77,8 +78,8 @@ IBM Cloud services:
|
|
|
77
78
|
|
|
78
79
|
Service Name | Imported Class Name
|
|
79
80
|
--- | ---
|
|
80
|
-
[IBM Cloud Code Engine V2](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.
|
|
81
|
-
[IBM Cloud Code Engine V1](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.
|
|
81
|
+
[IBM Cloud Code Engine V2](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.14.1) | CodeEngineV2
|
|
82
|
+
[IBM Cloud Code Engine V1](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.14.1) | IbmCloudCodeEngineV1
|
|
82
83
|
|
|
83
84
|
## Prerequisites
|
|
84
85
|
|
|
@@ -93,13 +94,13 @@ Service Name | Imported Class Name
|
|
|
93
94
|
To install, use `pip` or `easy_install`:
|
|
94
95
|
|
|
95
96
|
```bash
|
|
96
|
-
pip install --upgrade "ibm_code_engine_sdk>=4.
|
|
97
|
+
pip install --upgrade "ibm_code_engine_sdk>=4.14.1"
|
|
97
98
|
```
|
|
98
99
|
|
|
99
100
|
or
|
|
100
101
|
|
|
101
102
|
```bash
|
|
102
|
-
easy_install --upgrade "ibm_code_engine_sdk>=4.
|
|
103
|
+
easy_install --upgrade "ibm_code_engine_sdk>=4.14.1"
|
|
103
104
|
```
|
|
104
105
|
|
|
105
106
|
## Using the SDK
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!--
|
|
3
3
|
[](https://github.com/semantic-release/semantic-release)
|
|
4
4
|
-->
|
|
5
|
-
# Python SDK for IBM Cloud Code Engine 4.
|
|
5
|
+
# Python SDK for IBM Cloud Code Engine 4.14.1
|
|
6
6
|
|
|
7
7
|
Python client library to interact with the [IBM Cloud Code Engine API](https://cloud.ibm.com/apidocs/codeengine).
|
|
8
8
|
|
|
@@ -39,8 +39,8 @@ IBM Cloud services:
|
|
|
39
39
|
|
|
40
40
|
Service Name | Imported Class Name
|
|
41
41
|
--- | ---
|
|
42
|
-
[IBM Cloud Code Engine V2](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.
|
|
43
|
-
[IBM Cloud Code Engine V1](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.
|
|
42
|
+
[IBM Cloud Code Engine V2](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.14.1) | CodeEngineV2
|
|
43
|
+
[IBM Cloud Code Engine V1](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.14.1) | IbmCloudCodeEngineV1
|
|
44
44
|
|
|
45
45
|
## Prerequisites
|
|
46
46
|
|
|
@@ -55,13 +55,13 @@ Service Name | Imported Class Name
|
|
|
55
55
|
To install, use `pip` or `easy_install`:
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
pip install --upgrade "ibm_code_engine_sdk>=4.
|
|
58
|
+
pip install --upgrade "ibm_code_engine_sdk>=4.14.1"
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
or
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
easy_install --upgrade "ibm_code_engine_sdk>=4.
|
|
64
|
+
easy_install --upgrade "ibm_code_engine_sdk>=4.14.1"
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
## Using the SDK
|
{ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk/code_engine_v2.py
RENAMED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
# See the License for the specific language governing permissions and
|
|
15
15
|
# limitations under the License.
|
|
16
16
|
|
|
17
|
-
# IBM OpenAPI SDK Code Generator Version: 3.
|
|
17
|
+
# IBM OpenAPI SDK Code Generator Version: 3.99.0-d27cee72-20250129-204831
|
|
18
18
|
|
|
19
19
|
"""
|
|
20
20
|
REST API for Code Engine
|
|
@@ -56,7 +56,7 @@ class CodeEngineV2(BaseService):
|
|
|
56
56
|
|
|
57
57
|
:param str version: (optional) The API version, in format `YYYY-MM-DD`. For
|
|
58
58
|
the API behavior documented here, specify any date between `2021-03-31` and
|
|
59
|
-
`2025-
|
|
59
|
+
`2025-02-20`.
|
|
60
60
|
"""
|
|
61
61
|
authenticator = get_authenticator_from_environment(service_name)
|
|
62
62
|
service = cls(
|
|
@@ -80,7 +80,7 @@ class CodeEngineV2(BaseService):
|
|
|
80
80
|
|
|
81
81
|
:param str version: (optional) The API version, in format `YYYY-MM-DD`. For
|
|
82
82
|
the API behavior documented here, specify any date between `2021-03-31` and
|
|
83
|
-
`2025-
|
|
83
|
+
`2025-02-20`.
|
|
84
84
|
"""
|
|
85
85
|
BaseService.__init__(self, service_url=self.DEFAULT_SERVICE_URL, authenticator=authenticator)
|
|
86
86
|
self.version = version
|
|
@@ -2792,6 +2792,7 @@ class CodeEngineV2(BaseService):
|
|
|
2792
2792
|
output_secret: str,
|
|
2793
2793
|
strategy_type: str,
|
|
2794
2794
|
*,
|
|
2795
|
+
run_build_params: Optional[List['BuildParamPrototype']] = None,
|
|
2795
2796
|
source_context_dir: Optional[str] = None,
|
|
2796
2797
|
source_revision: Optional[str] = None,
|
|
2797
2798
|
source_secret: Optional[str] = None,
|
|
@@ -2815,6 +2816,9 @@ class CodeEngineV2(BaseService):
|
|
|
2815
2816
|
registry. Make sure that the secret is granted with push permissions
|
|
2816
2817
|
towards the specified container registry namespace.
|
|
2817
2818
|
:param str strategy_type: The strategy to use for building the image.
|
|
2819
|
+
:param List[BuildParamPrototype] run_build_params: (optional) Optional
|
|
2820
|
+
references to config maps and secret keys, or literal values that are
|
|
2821
|
+
exposed as build arguments within the Docker file.
|
|
2818
2822
|
:param str source_context_dir: (optional) Optional directory in the
|
|
2819
2823
|
repository that contains the buildpacks file or the Dockerfile.
|
|
2820
2824
|
:param str source_revision: (optional) Commit, tag, or branch in the source
|
|
@@ -2862,6 +2866,8 @@ class CodeEngineV2(BaseService):
|
|
|
2862
2866
|
raise ValueError('output_secret must be provided')
|
|
2863
2867
|
if strategy_type is None:
|
|
2864
2868
|
raise ValueError('strategy_type must be provided')
|
|
2869
|
+
if run_build_params is not None:
|
|
2870
|
+
run_build_params = [convert_model(x) for x in run_build_params]
|
|
2865
2871
|
headers = {}
|
|
2866
2872
|
sdk_headers = get_sdk_headers(
|
|
2867
2873
|
service_name=self.DEFAULT_SERVICE_NAME,
|
|
@@ -2875,6 +2881,7 @@ class CodeEngineV2(BaseService):
|
|
|
2875
2881
|
'output_image': output_image,
|
|
2876
2882
|
'output_secret': output_secret,
|
|
2877
2883
|
'strategy_type': strategy_type,
|
|
2884
|
+
'run_build_params': run_build_params,
|
|
2878
2885
|
'source_context_dir': source_context_dir,
|
|
2879
2886
|
'source_revision': source_revision,
|
|
2880
2887
|
'source_secret': source_secret,
|
|
@@ -3141,6 +3148,7 @@ class CodeEngineV2(BaseService):
|
|
|
3141
3148
|
name: Optional[str] = None,
|
|
3142
3149
|
output_image: Optional[str] = None,
|
|
3143
3150
|
output_secret: Optional[str] = None,
|
|
3151
|
+
run_build_params: Optional[List['BuildParamPrototype']] = None,
|
|
3144
3152
|
service_account: Optional[str] = None,
|
|
3145
3153
|
source_context_dir: Optional[str] = None,
|
|
3146
3154
|
source_revision: Optional[str] = None,
|
|
@@ -3171,6 +3179,9 @@ class CodeEngineV2(BaseService):
|
|
|
3171
3179
|
:param str output_secret: (optional) The secret that is required to access
|
|
3172
3180
|
the image registry. Make sure that the secret is granted with push
|
|
3173
3181
|
permissions towards the specified container registry namespace.
|
|
3182
|
+
:param List[BuildParamPrototype] run_build_params: (optional) Optional
|
|
3183
|
+
references to config maps and secret keys, or literal values that are
|
|
3184
|
+
exposed as build arguments within the Docker file.
|
|
3174
3185
|
:param str service_account: (optional) Optional service account, which is
|
|
3175
3186
|
used for resource control.” or “Optional service account that is used for
|
|
3176
3187
|
resource control.
|
|
@@ -3215,6 +3226,8 @@ class CodeEngineV2(BaseService):
|
|
|
3215
3226
|
|
|
3216
3227
|
if not project_id:
|
|
3217
3228
|
raise ValueError('project_id must be provided')
|
|
3229
|
+
if run_build_params is not None:
|
|
3230
|
+
run_build_params = [convert_model(x) for x in run_build_params]
|
|
3218
3231
|
headers = {}
|
|
3219
3232
|
sdk_headers = get_sdk_headers(
|
|
3220
3233
|
service_name=self.DEFAULT_SERVICE_NAME,
|
|
@@ -3228,6 +3241,7 @@ class CodeEngineV2(BaseService):
|
|
|
3228
3241
|
'name': name,
|
|
3229
3242
|
'output_image': output_image,
|
|
3230
3243
|
'output_secret': output_secret,
|
|
3244
|
+
'run_build_params': run_build_params,
|
|
3231
3245
|
'service_account': service_account,
|
|
3232
3246
|
'source_context_dir': source_context_dir,
|
|
3233
3247
|
'source_revision': source_revision,
|
|
@@ -3951,6 +3965,7 @@ class CodeEngineV2(BaseService):
|
|
|
3951
3965
|
self,
|
|
3952
3966
|
project_id: str,
|
|
3953
3967
|
*,
|
|
3968
|
+
format: Optional[str] = None,
|
|
3954
3969
|
limit: Optional[int] = None,
|
|
3955
3970
|
start: Optional[str] = None,
|
|
3956
3971
|
**kwargs,
|
|
@@ -3961,6 +3976,7 @@ class CodeEngineV2(BaseService):
|
|
|
3961
3976
|
List all secrets in a project.
|
|
3962
3977
|
|
|
3963
3978
|
:param str project_id: The ID of the project.
|
|
3979
|
+
:param str format: (optional) Secret format to filter results by.
|
|
3964
3980
|
:param int limit: (optional) Optional maximum number of secrets per page.
|
|
3965
3981
|
:param str start: (optional) An optional token that indicates the beginning
|
|
3966
3982
|
of the page of results to be returned. If omitted, the first page of
|
|
@@ -3982,6 +3998,7 @@ class CodeEngineV2(BaseService):
|
|
|
3982
3998
|
headers.update(sdk_headers)
|
|
3983
3999
|
|
|
3984
4000
|
params = {
|
|
4001
|
+
'format': format,
|
|
3985
4002
|
'limit': limit,
|
|
3986
4003
|
'start': start,
|
|
3987
4004
|
}
|
|
@@ -4266,6 +4283,25 @@ class CodeEngineV2(BaseService):
|
|
|
4266
4283
|
return response
|
|
4267
4284
|
|
|
4268
4285
|
|
|
4286
|
+
class ListSecretsEnums:
|
|
4287
|
+
"""
|
|
4288
|
+
Enums for list_secrets parameters.
|
|
4289
|
+
"""
|
|
4290
|
+
|
|
4291
|
+
class Format(str, Enum):
|
|
4292
|
+
"""
|
|
4293
|
+
Secret format to filter results by.
|
|
4294
|
+
"""
|
|
4295
|
+
|
|
4296
|
+
GENERIC = 'generic'
|
|
4297
|
+
SSH_AUTH = 'ssh_auth'
|
|
4298
|
+
REGISTRY = 'registry'
|
|
4299
|
+
BASIC_AUTH = 'basic_auth'
|
|
4300
|
+
TLS = 'tls'
|
|
4301
|
+
SERVICE_ACCESS = 'service_access'
|
|
4302
|
+
SERVICE_OPERATOR = 'service_operator'
|
|
4303
|
+
|
|
4304
|
+
|
|
4269
4305
|
##############################################################################
|
|
4270
4306
|
# Models
|
|
4271
4307
|
##############################################################################
|
|
@@ -5051,7 +5087,6 @@ class AppInstance:
|
|
|
5051
5087
|
in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de', 'eu-gb', 'jp-osa',
|
|
5052
5088
|
'jp-tok', 'us-east', 'us-south'.
|
|
5053
5089
|
:param str resource_type: (optional) The type of the app instance.
|
|
5054
|
-
:param int restarts: (optional) The number of restarts of the app instance.
|
|
5055
5090
|
:param str revision_name: The name of the revision that is associated with this
|
|
5056
5091
|
instance.
|
|
5057
5092
|
:param str scale_cpu_limit: The number of CPU set for the instance. For valid
|
|
@@ -5071,8 +5106,8 @@ class AppInstance:
|
|
|
5071
5106
|
of
|
|
5072
5107
|
measurement](https://cloud.ibm.com/docs/codeengine?topic=codeengine-mem-cpu-combo#unit-measurements).
|
|
5073
5108
|
:param str status: (optional) The current status of the instance.
|
|
5074
|
-
:param
|
|
5075
|
-
|
|
5109
|
+
:param AppInstanceStatusDetails status_details: (optional) The status of the pod
|
|
5110
|
+
and it's containers.
|
|
5076
5111
|
"""
|
|
5077
5112
|
|
|
5078
5113
|
def __init__(
|
|
@@ -5090,10 +5125,8 @@ class AppInstance:
|
|
|
5090
5125
|
project_id: Optional[str] = None,
|
|
5091
5126
|
region: Optional[str] = None,
|
|
5092
5127
|
resource_type: Optional[str] = None,
|
|
5093
|
-
restarts: Optional[int] = None,
|
|
5094
5128
|
status: Optional[str] = None,
|
|
5095
|
-
|
|
5096
|
-
user_container: Optional['ContainerStatus'] = None,
|
|
5129
|
+
status_details: Optional['AppInstanceStatusDetails'] = None,
|
|
5097
5130
|
) -> None:
|
|
5098
5131
|
"""
|
|
5099
5132
|
Initialize a AppInstance object.
|
|
@@ -5118,10 +5151,8 @@ class AppInstance:
|
|
|
5118
5151
|
and M are the shorthand expressions for GB and MB. For more information see
|
|
5119
5152
|
[Units of
|
|
5120
5153
|
measurement](https://cloud.ibm.com/docs/codeengine?topic=codeengine-mem-cpu-combo#unit-measurements).
|
|
5121
|
-
:param
|
|
5122
|
-
|
|
5123
|
-
:param ContainerStatus user_container: (optional) The status of a
|
|
5124
|
-
container.
|
|
5154
|
+
:param AppInstanceStatusDetails status_details: (optional) The status of
|
|
5155
|
+
the pod and it's containers.
|
|
5125
5156
|
"""
|
|
5126
5157
|
self.app_name = app_name
|
|
5127
5158
|
self.created_at = created_at
|
|
@@ -5131,14 +5162,12 @@ class AppInstance:
|
|
|
5131
5162
|
self.project_id = project_id
|
|
5132
5163
|
self.region = region
|
|
5133
5164
|
self.resource_type = resource_type
|
|
5134
|
-
self.restarts = restarts
|
|
5135
5165
|
self.revision_name = revision_name
|
|
5136
5166
|
self.scale_cpu_limit = scale_cpu_limit
|
|
5137
5167
|
self.scale_ephemeral_storage_limit = scale_ephemeral_storage_limit
|
|
5138
5168
|
self.scale_memory_limit = scale_memory_limit
|
|
5139
5169
|
self.status = status
|
|
5140
|
-
self.
|
|
5141
|
-
self.user_container = user_container
|
|
5170
|
+
self.status_details = status_details
|
|
5142
5171
|
|
|
5143
5172
|
@classmethod
|
|
5144
5173
|
def from_dict(cls, _dict: Dict) -> 'AppInstance':
|
|
@@ -5162,8 +5191,6 @@ class AppInstance:
|
|
|
5162
5191
|
args['region'] = region
|
|
5163
5192
|
if (resource_type := _dict.get('resource_type')) is not None:
|
|
5164
5193
|
args['resource_type'] = resource_type
|
|
5165
|
-
if (restarts := _dict.get('restarts')) is not None:
|
|
5166
|
-
args['restarts'] = restarts
|
|
5167
5194
|
if (revision_name := _dict.get('revision_name')) is not None:
|
|
5168
5195
|
args['revision_name'] = revision_name
|
|
5169
5196
|
else:
|
|
@@ -5182,10 +5209,8 @@ class AppInstance:
|
|
|
5182
5209
|
raise ValueError('Required property \'scale_memory_limit\' not present in AppInstance JSON')
|
|
5183
5210
|
if (status := _dict.get('status')) is not None:
|
|
5184
5211
|
args['status'] = status
|
|
5185
|
-
if (
|
|
5186
|
-
args['
|
|
5187
|
-
if (user_container := _dict.get('user_container')) is not None:
|
|
5188
|
-
args['user_container'] = ContainerStatus.from_dict(user_container)
|
|
5212
|
+
if (status_details := _dict.get('status_details')) is not None:
|
|
5213
|
+
args['status_details'] = AppInstanceStatusDetails.from_dict(status_details)
|
|
5189
5214
|
return cls(**args)
|
|
5190
5215
|
|
|
5191
5216
|
@classmethod
|
|
@@ -5212,8 +5237,6 @@ class AppInstance:
|
|
|
5212
5237
|
_dict['region'] = getattr(self, 'region')
|
|
5213
5238
|
if hasattr(self, 'resource_type') and getattr(self, 'resource_type') is not None:
|
|
5214
5239
|
_dict['resource_type'] = getattr(self, 'resource_type')
|
|
5215
|
-
if hasattr(self, 'restarts') and getattr(self, 'restarts') is not None:
|
|
5216
|
-
_dict['restarts'] = getattr(self, 'restarts')
|
|
5217
5240
|
if hasattr(self, 'revision_name') and self.revision_name is not None:
|
|
5218
5241
|
_dict['revision_name'] = self.revision_name
|
|
5219
5242
|
if hasattr(self, 'scale_cpu_limit') and self.scale_cpu_limit is not None:
|
|
@@ -5224,16 +5247,11 @@ class AppInstance:
|
|
|
5224
5247
|
_dict['scale_memory_limit'] = self.scale_memory_limit
|
|
5225
5248
|
if hasattr(self, 'status') and getattr(self, 'status') is not None:
|
|
5226
5249
|
_dict['status'] = getattr(self, 'status')
|
|
5227
|
-
if hasattr(self, '
|
|
5228
|
-
if isinstance(self.
|
|
5229
|
-
_dict['
|
|
5230
|
-
else:
|
|
5231
|
-
_dict['system_container'] = self.system_container.to_dict()
|
|
5232
|
-
if hasattr(self, 'user_container') and self.user_container is not None:
|
|
5233
|
-
if isinstance(self.user_container, dict):
|
|
5234
|
-
_dict['user_container'] = self.user_container
|
|
5250
|
+
if hasattr(self, 'status_details') and self.status_details is not None:
|
|
5251
|
+
if isinstance(self.status_details, dict):
|
|
5252
|
+
_dict['status_details'] = self.status_details
|
|
5235
5253
|
else:
|
|
5236
|
-
_dict['
|
|
5254
|
+
_dict['status_details'] = self.status_details.to_dict()
|
|
5237
5255
|
return _dict
|
|
5238
5256
|
|
|
5239
5257
|
def _to_dict(self):
|
|
@@ -5374,6 +5392,87 @@ class AppInstanceList:
|
|
|
5374
5392
|
return not self == other
|
|
5375
5393
|
|
|
5376
5394
|
|
|
5395
|
+
class AppInstanceStatusDetails:
|
|
5396
|
+
"""
|
|
5397
|
+
The status of the pod and it's containers.
|
|
5398
|
+
|
|
5399
|
+
:param int restarts: (optional) The number of restarts of the app instance.
|
|
5400
|
+
:param ContainerStatus system_container: (optional) The status of a container.
|
|
5401
|
+
:param ContainerStatus user_container: (optional) The status of a container.
|
|
5402
|
+
"""
|
|
5403
|
+
|
|
5404
|
+
def __init__(
|
|
5405
|
+
self,
|
|
5406
|
+
*,
|
|
5407
|
+
restarts: Optional[int] = None,
|
|
5408
|
+
system_container: Optional['ContainerStatus'] = None,
|
|
5409
|
+
user_container: Optional['ContainerStatus'] = None,
|
|
5410
|
+
) -> None:
|
|
5411
|
+
"""
|
|
5412
|
+
Initialize a AppInstanceStatusDetails object.
|
|
5413
|
+
|
|
5414
|
+
:param ContainerStatus system_container: (optional) The status of a
|
|
5415
|
+
container.
|
|
5416
|
+
:param ContainerStatus user_container: (optional) The status of a
|
|
5417
|
+
container.
|
|
5418
|
+
"""
|
|
5419
|
+
self.restarts = restarts
|
|
5420
|
+
self.system_container = system_container
|
|
5421
|
+
self.user_container = user_container
|
|
5422
|
+
|
|
5423
|
+
@classmethod
|
|
5424
|
+
def from_dict(cls, _dict: Dict) -> 'AppInstanceStatusDetails':
|
|
5425
|
+
"""Initialize a AppInstanceStatusDetails object from a json dictionary."""
|
|
5426
|
+
args = {}
|
|
5427
|
+
if (restarts := _dict.get('restarts')) is not None:
|
|
5428
|
+
args['restarts'] = restarts
|
|
5429
|
+
if (system_container := _dict.get('system_container')) is not None:
|
|
5430
|
+
args['system_container'] = ContainerStatus.from_dict(system_container)
|
|
5431
|
+
if (user_container := _dict.get('user_container')) is not None:
|
|
5432
|
+
args['user_container'] = ContainerStatus.from_dict(user_container)
|
|
5433
|
+
return cls(**args)
|
|
5434
|
+
|
|
5435
|
+
@classmethod
|
|
5436
|
+
def _from_dict(cls, _dict):
|
|
5437
|
+
"""Initialize a AppInstanceStatusDetails object from a json dictionary."""
|
|
5438
|
+
return cls.from_dict(_dict)
|
|
5439
|
+
|
|
5440
|
+
def to_dict(self) -> Dict:
|
|
5441
|
+
"""Return a json dictionary representing this model."""
|
|
5442
|
+
_dict = {}
|
|
5443
|
+
if hasattr(self, 'restarts') and getattr(self, 'restarts') is not None:
|
|
5444
|
+
_dict['restarts'] = getattr(self, 'restarts')
|
|
5445
|
+
if hasattr(self, 'system_container') and self.system_container is not None:
|
|
5446
|
+
if isinstance(self.system_container, dict):
|
|
5447
|
+
_dict['system_container'] = self.system_container
|
|
5448
|
+
else:
|
|
5449
|
+
_dict['system_container'] = self.system_container.to_dict()
|
|
5450
|
+
if hasattr(self, 'user_container') and self.user_container is not None:
|
|
5451
|
+
if isinstance(self.user_container, dict):
|
|
5452
|
+
_dict['user_container'] = self.user_container
|
|
5453
|
+
else:
|
|
5454
|
+
_dict['user_container'] = self.user_container.to_dict()
|
|
5455
|
+
return _dict
|
|
5456
|
+
|
|
5457
|
+
def _to_dict(self):
|
|
5458
|
+
"""Return a json dictionary representing this model."""
|
|
5459
|
+
return self.to_dict()
|
|
5460
|
+
|
|
5461
|
+
def __str__(self) -> str:
|
|
5462
|
+
"""Return a `str` version of this AppInstanceStatusDetails object."""
|
|
5463
|
+
return json.dumps(self.to_dict(), indent=2)
|
|
5464
|
+
|
|
5465
|
+
def __eq__(self, other: 'AppInstanceStatusDetails') -> bool:
|
|
5466
|
+
"""Return `true` when self and other are equal, false otherwise."""
|
|
5467
|
+
if not isinstance(other, self.__class__):
|
|
5468
|
+
return False
|
|
5469
|
+
return self.__dict__ == other.__dict__
|
|
5470
|
+
|
|
5471
|
+
def __ne__(self, other: 'AppInstanceStatusDetails') -> bool:
|
|
5472
|
+
"""Return `true` when self and other are not equal, false otherwise."""
|
|
5473
|
+
return not self == other
|
|
5474
|
+
|
|
5475
|
+
|
|
5377
5476
|
class AppList:
|
|
5378
5477
|
"""
|
|
5379
5478
|
Contains a list of apps and pagination information.
|
|
@@ -6868,6 +6967,9 @@ class Build:
|
|
|
6868
6967
|
in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de', 'eu-gb', 'jp-osa',
|
|
6869
6968
|
'jp-tok', 'us-east', 'us-south'.
|
|
6870
6969
|
:param str resource_type: (optional) The type of the build.
|
|
6970
|
+
:param List[BuildParam] run_build_params: (optional) References to config maps
|
|
6971
|
+
and secret keys, or literal values, which are defined by the build owner and are
|
|
6972
|
+
exposed as build arguments in Docker files.
|
|
6871
6973
|
:param str source_context_dir: (optional) Optional directory in the repository
|
|
6872
6974
|
that contains the buildpacks file or the Dockerfile.
|
|
6873
6975
|
:param str source_revision: (optional) Commit, tag, or branch in the source
|
|
@@ -6919,6 +7021,7 @@ class Build:
|
|
|
6919
7021
|
project_id: Optional[str] = None,
|
|
6920
7022
|
region: Optional[str] = None,
|
|
6921
7023
|
resource_type: Optional[str] = None,
|
|
7024
|
+
run_build_params: Optional[List['BuildParam']] = None,
|
|
6922
7025
|
source_context_dir: Optional[str] = None,
|
|
6923
7026
|
source_revision: Optional[str] = None,
|
|
6924
7027
|
source_secret: Optional[str] = None,
|
|
@@ -6946,6 +7049,9 @@ class Build:
|
|
|
6946
7049
|
`xlarge`, `xxlarge`.
|
|
6947
7050
|
:param str strategy_type: The strategy to use for building the image.
|
|
6948
7051
|
:param str name: (optional) The name of the build.
|
|
7052
|
+
:param List[BuildParam] run_build_params: (optional) References to config
|
|
7053
|
+
maps and secret keys, or literal values, which are defined by the build
|
|
7054
|
+
owner and are exposed as build arguments in Docker files.
|
|
6949
7055
|
:param str source_context_dir: (optional) Optional directory in the
|
|
6950
7056
|
repository that contains the buildpacks file or the Dockerfile.
|
|
6951
7057
|
:param str source_revision: (optional) Commit, tag, or branch in the source
|
|
@@ -6983,6 +7089,7 @@ class Build:
|
|
|
6983
7089
|
self.project_id = project_id
|
|
6984
7090
|
self.region = region
|
|
6985
7091
|
self.resource_type = resource_type
|
|
7092
|
+
self.run_build_params = run_build_params
|
|
6986
7093
|
self.source_context_dir = source_context_dir
|
|
6987
7094
|
self.source_revision = source_revision
|
|
6988
7095
|
self.source_secret = source_secret
|
|
@@ -7025,6 +7132,8 @@ class Build:
|
|
|
7025
7132
|
args['region'] = region
|
|
7026
7133
|
if (resource_type := _dict.get('resource_type')) is not None:
|
|
7027
7134
|
args['resource_type'] = resource_type
|
|
7135
|
+
if (run_build_params := _dict.get('run_build_params')) is not None:
|
|
7136
|
+
args['run_build_params'] = [BuildParam.from_dict(v) for v in run_build_params]
|
|
7028
7137
|
if (source_context_dir := _dict.get('source_context_dir')) is not None:
|
|
7029
7138
|
args['source_context_dir'] = source_context_dir
|
|
7030
7139
|
if (source_revision := _dict.get('source_revision')) is not None:
|
|
@@ -7083,6 +7192,14 @@ class Build:
|
|
|
7083
7192
|
_dict['region'] = getattr(self, 'region')
|
|
7084
7193
|
if hasattr(self, 'resource_type') and getattr(self, 'resource_type') is not None:
|
|
7085
7194
|
_dict['resource_type'] = getattr(self, 'resource_type')
|
|
7195
|
+
if hasattr(self, 'run_build_params') and self.run_build_params is not None:
|
|
7196
|
+
run_build_params_list = []
|
|
7197
|
+
for v in self.run_build_params:
|
|
7198
|
+
if isinstance(v, dict):
|
|
7199
|
+
run_build_params_list.append(v)
|
|
7200
|
+
else:
|
|
7201
|
+
run_build_params_list.append(v.to_dict())
|
|
7202
|
+
_dict['run_build_params'] = run_build_params_list
|
|
7086
7203
|
if hasattr(self, 'source_context_dir') and self.source_context_dir is not None:
|
|
7087
7204
|
_dict['source_context_dir'] = self.source_context_dir
|
|
7088
7205
|
if hasattr(self, 'source_revision') and self.source_revision is not None:
|
|
@@ -7277,6 +7394,208 @@ class BuildList:
|
|
|
7277
7394
|
return not self == other
|
|
7278
7395
|
|
|
7279
7396
|
|
|
7397
|
+
class BuildParam:
|
|
7398
|
+
"""
|
|
7399
|
+
Response model for build params.
|
|
7400
|
+
|
|
7401
|
+
:param str key: (optional) The key to reference as build param.
|
|
7402
|
+
:param str name: (optional) The name of the build param.
|
|
7403
|
+
:param str reference: (optional) The name of the secret or config map.
|
|
7404
|
+
:param str type: Specify the type of the build param.
|
|
7405
|
+
:param str value: (optional) The literal value of the build param.
|
|
7406
|
+
"""
|
|
7407
|
+
|
|
7408
|
+
def __init__(
|
|
7409
|
+
self,
|
|
7410
|
+
type: str,
|
|
7411
|
+
*,
|
|
7412
|
+
key: Optional[str] = None,
|
|
7413
|
+
name: Optional[str] = None,
|
|
7414
|
+
reference: Optional[str] = None,
|
|
7415
|
+
value: Optional[str] = None,
|
|
7416
|
+
) -> None:
|
|
7417
|
+
"""
|
|
7418
|
+
Initialize a BuildParam object.
|
|
7419
|
+
|
|
7420
|
+
:param str type: Specify the type of the build param.
|
|
7421
|
+
:param str key: (optional) The key to reference as build param.
|
|
7422
|
+
:param str name: (optional) The name of the build param.
|
|
7423
|
+
:param str reference: (optional) The name of the secret or config map.
|
|
7424
|
+
:param str value: (optional) The literal value of the build param.
|
|
7425
|
+
"""
|
|
7426
|
+
self.key = key
|
|
7427
|
+
self.name = name
|
|
7428
|
+
self.reference = reference
|
|
7429
|
+
self.type = type
|
|
7430
|
+
self.value = value
|
|
7431
|
+
|
|
7432
|
+
@classmethod
|
|
7433
|
+
def from_dict(cls, _dict: Dict) -> 'BuildParam':
|
|
7434
|
+
"""Initialize a BuildParam object from a json dictionary."""
|
|
7435
|
+
args = {}
|
|
7436
|
+
if (key := _dict.get('key')) is not None:
|
|
7437
|
+
args['key'] = key
|
|
7438
|
+
if (name := _dict.get('name')) is not None:
|
|
7439
|
+
args['name'] = name
|
|
7440
|
+
if (reference := _dict.get('reference')) is not None:
|
|
7441
|
+
args['reference'] = reference
|
|
7442
|
+
if (type := _dict.get('type')) is not None:
|
|
7443
|
+
args['type'] = type
|
|
7444
|
+
else:
|
|
7445
|
+
raise ValueError('Required property \'type\' not present in BuildParam JSON')
|
|
7446
|
+
if (value := _dict.get('value')) is not None:
|
|
7447
|
+
args['value'] = value
|
|
7448
|
+
return cls(**args)
|
|
7449
|
+
|
|
7450
|
+
@classmethod
|
|
7451
|
+
def _from_dict(cls, _dict):
|
|
7452
|
+
"""Initialize a BuildParam object from a json dictionary."""
|
|
7453
|
+
return cls.from_dict(_dict)
|
|
7454
|
+
|
|
7455
|
+
def to_dict(self) -> Dict:
|
|
7456
|
+
"""Return a json dictionary representing this model."""
|
|
7457
|
+
_dict = {}
|
|
7458
|
+
if hasattr(self, 'key') and self.key is not None:
|
|
7459
|
+
_dict['key'] = self.key
|
|
7460
|
+
if hasattr(self, 'name') and self.name is not None:
|
|
7461
|
+
_dict['name'] = self.name
|
|
7462
|
+
if hasattr(self, 'reference') and self.reference is not None:
|
|
7463
|
+
_dict['reference'] = self.reference
|
|
7464
|
+
if hasattr(self, 'type') and self.type is not None:
|
|
7465
|
+
_dict['type'] = self.type
|
|
7466
|
+
if hasattr(self, 'value') and self.value is not None:
|
|
7467
|
+
_dict['value'] = self.value
|
|
7468
|
+
return _dict
|
|
7469
|
+
|
|
7470
|
+
def _to_dict(self):
|
|
7471
|
+
"""Return a json dictionary representing this model."""
|
|
7472
|
+
return self.to_dict()
|
|
7473
|
+
|
|
7474
|
+
def __str__(self) -> str:
|
|
7475
|
+
"""Return a `str` version of this BuildParam object."""
|
|
7476
|
+
return json.dumps(self.to_dict(), indent=2)
|
|
7477
|
+
|
|
7478
|
+
def __eq__(self, other: 'BuildParam') -> bool:
|
|
7479
|
+
"""Return `true` when self and other are equal, false otherwise."""
|
|
7480
|
+
if not isinstance(other, self.__class__):
|
|
7481
|
+
return False
|
|
7482
|
+
return self.__dict__ == other.__dict__
|
|
7483
|
+
|
|
7484
|
+
def __ne__(self, other: 'BuildParam') -> bool:
|
|
7485
|
+
"""Return `true` when self and other are not equal, false otherwise."""
|
|
7486
|
+
return not self == other
|
|
7487
|
+
|
|
7488
|
+
class TypeEnum(str, Enum):
|
|
7489
|
+
"""
|
|
7490
|
+
Specify the type of the build param.
|
|
7491
|
+
"""
|
|
7492
|
+
|
|
7493
|
+
LITERAL = 'literal'
|
|
7494
|
+
CONFIG_MAP_KEY_REFERENCE = 'config_map_key_reference'
|
|
7495
|
+
SECRET_KEY_REFERENCE = 'secret_key_reference'
|
|
7496
|
+
|
|
7497
|
+
|
|
7498
|
+
class BuildParamPrototype:
|
|
7499
|
+
"""
|
|
7500
|
+
Prototype model for build params.
|
|
7501
|
+
|
|
7502
|
+
:param str key: (optional) The key to reference as build param.
|
|
7503
|
+
:param str name: (optional) The name of the build param.
|
|
7504
|
+
:param str reference: (optional) The name of the secret or config map.
|
|
7505
|
+
:param str type: Specify the type of the build param.
|
|
7506
|
+
:param str value: (optional) The literal value of the build param.
|
|
7507
|
+
"""
|
|
7508
|
+
|
|
7509
|
+
def __init__(
|
|
7510
|
+
self,
|
|
7511
|
+
type: str,
|
|
7512
|
+
*,
|
|
7513
|
+
key: Optional[str] = None,
|
|
7514
|
+
name: Optional[str] = None,
|
|
7515
|
+
reference: Optional[str] = None,
|
|
7516
|
+
value: Optional[str] = None,
|
|
7517
|
+
) -> None:
|
|
7518
|
+
"""
|
|
7519
|
+
Initialize a BuildParamPrototype object.
|
|
7520
|
+
|
|
7521
|
+
:param str type: Specify the type of the build param.
|
|
7522
|
+
:param str key: (optional) The key to reference as build param.
|
|
7523
|
+
:param str name: (optional) The name of the build param.
|
|
7524
|
+
:param str reference: (optional) The name of the secret or config map.
|
|
7525
|
+
:param str value: (optional) The literal value of the build param.
|
|
7526
|
+
"""
|
|
7527
|
+
self.key = key
|
|
7528
|
+
self.name = name
|
|
7529
|
+
self.reference = reference
|
|
7530
|
+
self.type = type
|
|
7531
|
+
self.value = value
|
|
7532
|
+
|
|
7533
|
+
@classmethod
|
|
7534
|
+
def from_dict(cls, _dict: Dict) -> 'BuildParamPrototype':
|
|
7535
|
+
"""Initialize a BuildParamPrototype object from a json dictionary."""
|
|
7536
|
+
args = {}
|
|
7537
|
+
if (key := _dict.get('key')) is not None:
|
|
7538
|
+
args['key'] = key
|
|
7539
|
+
if (name := _dict.get('name')) is not None:
|
|
7540
|
+
args['name'] = name
|
|
7541
|
+
if (reference := _dict.get('reference')) is not None:
|
|
7542
|
+
args['reference'] = reference
|
|
7543
|
+
if (type := _dict.get('type')) is not None:
|
|
7544
|
+
args['type'] = type
|
|
7545
|
+
else:
|
|
7546
|
+
raise ValueError('Required property \'type\' not present in BuildParamPrototype JSON')
|
|
7547
|
+
if (value := _dict.get('value')) is not None:
|
|
7548
|
+
args['value'] = value
|
|
7549
|
+
return cls(**args)
|
|
7550
|
+
|
|
7551
|
+
@classmethod
|
|
7552
|
+
def _from_dict(cls, _dict):
|
|
7553
|
+
"""Initialize a BuildParamPrototype object from a json dictionary."""
|
|
7554
|
+
return cls.from_dict(_dict)
|
|
7555
|
+
|
|
7556
|
+
def to_dict(self) -> Dict:
|
|
7557
|
+
"""Return a json dictionary representing this model."""
|
|
7558
|
+
_dict = {}
|
|
7559
|
+
if hasattr(self, 'key') and self.key is not None:
|
|
7560
|
+
_dict['key'] = self.key
|
|
7561
|
+
if hasattr(self, 'name') and self.name is not None:
|
|
7562
|
+
_dict['name'] = self.name
|
|
7563
|
+
if hasattr(self, 'reference') and self.reference is not None:
|
|
7564
|
+
_dict['reference'] = self.reference
|
|
7565
|
+
if hasattr(self, 'type') and self.type is not None:
|
|
7566
|
+
_dict['type'] = self.type
|
|
7567
|
+
if hasattr(self, 'value') and self.value is not None:
|
|
7568
|
+
_dict['value'] = self.value
|
|
7569
|
+
return _dict
|
|
7570
|
+
|
|
7571
|
+
def _to_dict(self):
|
|
7572
|
+
"""Return a json dictionary representing this model."""
|
|
7573
|
+
return self.to_dict()
|
|
7574
|
+
|
|
7575
|
+
def __str__(self) -> str:
|
|
7576
|
+
"""Return a `str` version of this BuildParamPrototype object."""
|
|
7577
|
+
return json.dumps(self.to_dict(), indent=2)
|
|
7578
|
+
|
|
7579
|
+
def __eq__(self, other: 'BuildParamPrototype') -> bool:
|
|
7580
|
+
"""Return `true` when self and other are equal, false otherwise."""
|
|
7581
|
+
if not isinstance(other, self.__class__):
|
|
7582
|
+
return False
|
|
7583
|
+
return self.__dict__ == other.__dict__
|
|
7584
|
+
|
|
7585
|
+
def __ne__(self, other: 'BuildParamPrototype') -> bool:
|
|
7586
|
+
"""Return `true` when self and other are not equal, false otherwise."""
|
|
7587
|
+
return not self == other
|
|
7588
|
+
|
|
7589
|
+
class TypeEnum(str, Enum):
|
|
7590
|
+
"""
|
|
7591
|
+
Specify the type of the build param.
|
|
7592
|
+
"""
|
|
7593
|
+
|
|
7594
|
+
LITERAL = 'literal'
|
|
7595
|
+
CONFIG_MAP_KEY_REFERENCE = 'config_map_key_reference'
|
|
7596
|
+
SECRET_KEY_REFERENCE = 'secret_key_reference'
|
|
7597
|
+
|
|
7598
|
+
|
|
7280
7599
|
class BuildPatch:
|
|
7281
7600
|
"""
|
|
7282
7601
|
Patch a build object.
|
|
@@ -7285,6 +7604,9 @@ class BuildPatch:
|
|
|
7285
7604
|
:param str output_secret: (optional) The secret that is required to access the
|
|
7286
7605
|
image registry. Make sure that the secret is granted with push permissions
|
|
7287
7606
|
towards the specified container registry namespace.
|
|
7607
|
+
:param List[BuildParamPrototype] run_build_params: (optional) Optional
|
|
7608
|
+
references to config maps and secret keys, or literal values that are exposed as
|
|
7609
|
+
build arguments within the Docker file.
|
|
7288
7610
|
:param str source_context_dir: (optional) Optional directory in the repository
|
|
7289
7611
|
that contains the buildpacks file or the Dockerfile.
|
|
7290
7612
|
:param str source_revision: (optional) Commit, tag, or branch in the source
|
|
@@ -7323,6 +7645,7 @@ class BuildPatch:
|
|
|
7323
7645
|
*,
|
|
7324
7646
|
output_image: Optional[str] = None,
|
|
7325
7647
|
output_secret: Optional[str] = None,
|
|
7648
|
+
run_build_params: Optional[List['BuildParamPrototype']] = None,
|
|
7326
7649
|
source_context_dir: Optional[str] = None,
|
|
7327
7650
|
source_revision: Optional[str] = None,
|
|
7328
7651
|
source_secret: Optional[str] = None,
|
|
@@ -7340,6 +7663,9 @@ class BuildPatch:
|
|
|
7340
7663
|
:param str output_secret: (optional) The secret that is required to access
|
|
7341
7664
|
the image registry. Make sure that the secret is granted with push
|
|
7342
7665
|
permissions towards the specified container registry namespace.
|
|
7666
|
+
:param List[BuildParamPrototype] run_build_params: (optional) Optional
|
|
7667
|
+
references to config maps and secret keys, or literal values that are
|
|
7668
|
+
exposed as build arguments within the Docker file.
|
|
7343
7669
|
:param str source_context_dir: (optional) Optional directory in the
|
|
7344
7670
|
repository that contains the buildpacks file or the Dockerfile.
|
|
7345
7671
|
:param str source_revision: (optional) Commit, tag, or branch in the source
|
|
@@ -7377,6 +7703,7 @@ class BuildPatch:
|
|
|
7377
7703
|
"""
|
|
7378
7704
|
self.output_image = output_image
|
|
7379
7705
|
self.output_secret = output_secret
|
|
7706
|
+
self.run_build_params = run_build_params
|
|
7380
7707
|
self.source_context_dir = source_context_dir
|
|
7381
7708
|
self.source_revision = source_revision
|
|
7382
7709
|
self.source_secret = source_secret
|
|
@@ -7395,6 +7722,8 @@ class BuildPatch:
|
|
|
7395
7722
|
args['output_image'] = output_image
|
|
7396
7723
|
if (output_secret := _dict.get('output_secret')) is not None:
|
|
7397
7724
|
args['output_secret'] = output_secret
|
|
7725
|
+
if (run_build_params := _dict.get('run_build_params')) is not None:
|
|
7726
|
+
args['run_build_params'] = [BuildParamPrototype.from_dict(v) for v in run_build_params]
|
|
7398
7727
|
if (source_context_dir := _dict.get('source_context_dir')) is not None:
|
|
7399
7728
|
args['source_context_dir'] = source_context_dir
|
|
7400
7729
|
if (source_revision := _dict.get('source_revision')) is not None:
|
|
@@ -7427,6 +7756,14 @@ class BuildPatch:
|
|
|
7427
7756
|
_dict['output_image'] = self.output_image
|
|
7428
7757
|
if hasattr(self, 'output_secret') and self.output_secret is not None:
|
|
7429
7758
|
_dict['output_secret'] = self.output_secret
|
|
7759
|
+
if hasattr(self, 'run_build_params') and self.run_build_params is not None:
|
|
7760
|
+
run_build_params_list = []
|
|
7761
|
+
for v in self.run_build_params:
|
|
7762
|
+
if isinstance(v, dict):
|
|
7763
|
+
run_build_params_list.append(v)
|
|
7764
|
+
else:
|
|
7765
|
+
run_build_params_list.append(v.to_dict())
|
|
7766
|
+
_dict['run_build_params'] = run_build_params_list
|
|
7430
7767
|
if hasattr(self, 'source_context_dir') and self.source_context_dir is not None:
|
|
7431
7768
|
_dict['source_context_dir'] = self.source_context_dir
|
|
7432
7769
|
if hasattr(self, 'source_revision') and self.source_revision is not None:
|
|
@@ -7521,6 +7858,9 @@ class BuildRun:
|
|
|
7521
7858
|
in. Possible values: 'au-syd', 'br-sao', 'ca-tor', 'eu-de', 'eu-gb', 'jp-osa',
|
|
7522
7859
|
'jp-tok', 'us-east', 'us-south'.
|
|
7523
7860
|
:param str resource_type: (optional) The type of the build run.
|
|
7861
|
+
:param List[BuildParam] run_build_params: (optional) References to config maps
|
|
7862
|
+
and secret keys, or literal values, which are defined by the build owner and are
|
|
7863
|
+
exposed as build arguments in Docker files.
|
|
7524
7864
|
:param str service_account: (optional) Optional service account, which is used
|
|
7525
7865
|
for resource control.” or “Optional service account that is used for resource
|
|
7526
7866
|
control.
|
|
@@ -7573,6 +7913,7 @@ class BuildRun:
|
|
|
7573
7913
|
project_id: Optional[str] = None,
|
|
7574
7914
|
region: Optional[str] = None,
|
|
7575
7915
|
resource_type: Optional[str] = None,
|
|
7916
|
+
run_build_params: Optional[List['BuildParam']] = None,
|
|
7576
7917
|
service_account: Optional[str] = None,
|
|
7577
7918
|
source_context_dir: Optional[str] = None,
|
|
7578
7919
|
source_revision: Optional[str] = None,
|
|
@@ -7599,6 +7940,9 @@ class BuildRun:
|
|
|
7599
7940
|
:param str output_secret: (optional) The secret that is required to access
|
|
7600
7941
|
the image registry. Make sure that the secret is granted with push
|
|
7601
7942
|
permissions towards the specified container registry namespace.
|
|
7943
|
+
:param List[BuildParam] run_build_params: (optional) References to config
|
|
7944
|
+
maps and secret keys, or literal values, which are defined by the build
|
|
7945
|
+
owner and are exposed as build arguments in Docker files.
|
|
7602
7946
|
:param str service_account: (optional) Optional service account, which is
|
|
7603
7947
|
used for resource control.” or “Optional service account that is used for
|
|
7604
7948
|
resource control.
|
|
@@ -7649,6 +7993,7 @@ class BuildRun:
|
|
|
7649
7993
|
self.project_id = project_id
|
|
7650
7994
|
self.region = region
|
|
7651
7995
|
self.resource_type = resource_type
|
|
7996
|
+
self.run_build_params = run_build_params
|
|
7652
7997
|
self.service_account = service_account
|
|
7653
7998
|
self.source_context_dir = source_context_dir
|
|
7654
7999
|
self.source_revision = source_revision
|
|
@@ -7690,6 +8035,8 @@ class BuildRun:
|
|
|
7690
8035
|
args['region'] = region
|
|
7691
8036
|
if (resource_type := _dict.get('resource_type')) is not None:
|
|
7692
8037
|
args['resource_type'] = resource_type
|
|
8038
|
+
if (run_build_params := _dict.get('run_build_params')) is not None:
|
|
8039
|
+
args['run_build_params'] = [BuildParam.from_dict(v) for v in run_build_params]
|
|
7693
8040
|
if (service_account := _dict.get('service_account')) is not None:
|
|
7694
8041
|
args['service_account'] = service_account
|
|
7695
8042
|
if (source_context_dir := _dict.get('source_context_dir')) is not None:
|
|
@@ -7744,6 +8091,14 @@ class BuildRun:
|
|
|
7744
8091
|
_dict['region'] = getattr(self, 'region')
|
|
7745
8092
|
if hasattr(self, 'resource_type') and getattr(self, 'resource_type') is not None:
|
|
7746
8093
|
_dict['resource_type'] = getattr(self, 'resource_type')
|
|
8094
|
+
if hasattr(self, 'run_build_params') and self.run_build_params is not None:
|
|
8095
|
+
run_build_params_list = []
|
|
8096
|
+
for v in self.run_build_params:
|
|
8097
|
+
if isinstance(v, dict):
|
|
8098
|
+
run_build_params_list.append(v)
|
|
8099
|
+
else:
|
|
8100
|
+
run_build_params_list.append(v.to_dict())
|
|
8101
|
+
_dict['run_build_params'] = run_build_params_list
|
|
7747
8102
|
if hasattr(self, 'service_account') and self.service_account is not None:
|
|
7748
8103
|
_dict['service_account'] = self.service_account
|
|
7749
8104
|
if hasattr(self, 'source_context_dir') and self.source_context_dir is not None:
|
|
@@ -8631,29 +8986,14 @@ class ContainerStatusDetails:
|
|
|
8631
8986
|
"""Return `true` when self and other are not equal, false otherwise."""
|
|
8632
8987
|
return not self == other
|
|
8633
8988
|
|
|
8634
|
-
class
|
|
8989
|
+
class ContainerStatusEnum(str, Enum):
|
|
8635
8990
|
"""
|
|
8636
|
-
The
|
|
8637
|
-
non-running states.
|
|
8991
|
+
The status of the container.
|
|
8638
8992
|
"""
|
|
8639
8993
|
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
DEPLOYING_WAITING_FOR_RESOURCES = 'deploying_waiting_for_resources'
|
|
8644
|
-
INITIAL_SCALE_NEVER_ACHIEVED = 'initial_scale_never_achieved'
|
|
8645
|
-
FETCH_IMAGE_FAILED_UNKNOWN_MANIFEST = 'fetch_image_failed_unknown_manifest'
|
|
8646
|
-
FETCH_IMAGE_FAILED_UNKNOWN_REPOSITORY = 'fetch_image_failed_unknown_repository'
|
|
8647
|
-
FETCH_IMAGE_FAILED_REGISTRY_NOT_FOUND = 'fetch_image_failed_registry_not_found'
|
|
8648
|
-
FETCH_IMAGE_FAILED_MISSING_PULL_SECRET = 'fetch_image_failed_missing_pull_secret'
|
|
8649
|
-
FETCH_IMAGE_FAILED_WRONG_PULL_CREDENTIALS = 'fetch_image_failed_wrong_pull_credentials'
|
|
8650
|
-
FETCH_IMAGE_FAILED_MISSING_PULL_CREDENTIALS = 'fetch_image_failed_missing_pull_credentials'
|
|
8651
|
-
CONTAINER_FAILED_EXIT_CODE_0 = 'container_failed_exit_code_0'
|
|
8652
|
-
CONTAINER_FAILED_EXIT_CODE_1 = 'container_failed_exit_code_1'
|
|
8653
|
-
CONTAINER_FAILED_EXIT_CODE_139 = 'container_failed_exit_code_139'
|
|
8654
|
-
CONTAINER_FAILED_EXIT_CODE_24 = 'container_failed_exit_code_24'
|
|
8655
|
-
IMAGE_PULL_BACK_OFF = 'image_pull_back_off'
|
|
8656
|
-
INVALID_TAR_HEADER_IMAGE_PULL_ERR = 'invalid_tar_header_image_pull_err'
|
|
8994
|
+
RUNNING = 'running'
|
|
8995
|
+
PENDING = 'pending'
|
|
8996
|
+
TERMINATED = 'terminated'
|
|
8657
8997
|
|
|
8658
8998
|
|
|
8659
8999
|
class DomainMapping:
|
|
@@ -14485,7 +14825,7 @@ class SecretDataBasicAuthSecretData(SecretData):
|
|
|
14485
14825
|
raise ValueError('Value for additional property {} must be of type str'.format(k))
|
|
14486
14826
|
setattr(self, k, v)
|
|
14487
14827
|
else:
|
|
14488
|
-
raise ValueError('Property {} cannot be specified as an additional property'.format(
|
|
14828
|
+
raise ValueError('Property {} cannot be specified as an additional property'.format(k))
|
|
14489
14829
|
|
|
14490
14830
|
def __str__(self) -> str:
|
|
14491
14831
|
"""Return a `str` version of this SecretDataBasicAuthSecretData object."""
|
|
@@ -14697,7 +15037,7 @@ class SecretDataRegistrySecretData(SecretData):
|
|
|
14697
15037
|
raise ValueError('Value for additional property {} must be of type str'.format(k))
|
|
14698
15038
|
setattr(self, k, v)
|
|
14699
15039
|
else:
|
|
14700
|
-
raise ValueError('Property {} cannot be specified as an additional property'.format(
|
|
15040
|
+
raise ValueError('Property {} cannot be specified as an additional property'.format(k))
|
|
14701
15041
|
|
|
14702
15042
|
def __str__(self) -> str:
|
|
14703
15043
|
"""Return a `str` version of this SecretDataRegistrySecretData object."""
|
|
@@ -14806,7 +15146,7 @@ class SecretDataSSHSecretData(SecretData):
|
|
|
14806
15146
|
raise ValueError('Value for additional property {} must be of type str'.format(k))
|
|
14807
15147
|
setattr(self, k, v)
|
|
14808
15148
|
else:
|
|
14809
|
-
raise ValueError('Property {} cannot be specified as an additional property'.format(
|
|
15149
|
+
raise ValueError('Property {} cannot be specified as an additional property'.format(k))
|
|
14810
15150
|
|
|
14811
15151
|
def __str__(self) -> str:
|
|
14812
15152
|
"""Return a `str` version of this SecretDataSSHSecretData object."""
|
|
@@ -14916,7 +15256,7 @@ class SecretDataTLSSecretData(SecretData):
|
|
|
14916
15256
|
raise ValueError('Value for additional property {} must be of type str'.format(k))
|
|
14917
15257
|
setattr(self, k, v)
|
|
14918
15258
|
else:
|
|
14919
|
-
raise ValueError('Property {} cannot be specified as an additional property'.format(
|
|
15259
|
+
raise ValueError('Property {} cannot be specified as an additional property'.format(k))
|
|
14920
15260
|
|
|
14921
15261
|
def __str__(self) -> str:
|
|
14922
15262
|
"""Return a `str` version of this SecretDataTLSSecretData object."""
|
|
@@ -15850,17 +16190,20 @@ class SecretsPager:
|
|
|
15850
16190
|
*,
|
|
15851
16191
|
client: CodeEngineV2,
|
|
15852
16192
|
project_id: str,
|
|
16193
|
+
format: str = None,
|
|
15853
16194
|
limit: int = None,
|
|
15854
16195
|
) -> None:
|
|
15855
16196
|
"""
|
|
15856
16197
|
Initialize a SecretsPager object.
|
|
15857
16198
|
:param str project_id: The ID of the project.
|
|
16199
|
+
:param str format: (optional) Secret format to filter results by.
|
|
15858
16200
|
:param int limit: (optional) Optional maximum number of secrets per page.
|
|
15859
16201
|
"""
|
|
15860
16202
|
self._has_next = True
|
|
15861
16203
|
self._client = client
|
|
15862
16204
|
self._page_context = {'next': None}
|
|
15863
16205
|
self._project_id = project_id
|
|
16206
|
+
self._format = format
|
|
15864
16207
|
self._limit = limit
|
|
15865
16208
|
|
|
15866
16209
|
def has_next(self) -> bool:
|
|
@@ -15880,6 +16223,7 @@ class SecretsPager:
|
|
|
15880
16223
|
|
|
15881
16224
|
result = self._client.list_secrets(
|
|
15882
16225
|
project_id=self._project_id,
|
|
16226
|
+
format=self._format,
|
|
15883
16227
|
limit=self._limit,
|
|
15884
16228
|
start=self._page_context.get('next'),
|
|
15885
16229
|
).get_result()
|
{ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1/ibm_code_engine_sdk.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: ibm-code-engine-sdk
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.14.1
|
|
4
4
|
Summary: Python SDK for IBM Cloud Code Engine
|
|
5
5
|
Home-page: https://github.com/IBM/code-engine-python-sdk
|
|
6
6
|
Author: IBM
|
|
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
17
|
Classifier: Development Status :: 5 - Production/Stable
|
|
17
18
|
Classifier: Intended Audience :: Developers
|
|
18
19
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -22,7 +23,7 @@ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
|
|
22
23
|
Description-Content-Type: text/markdown
|
|
23
24
|
License-File: LICENSE
|
|
24
25
|
Requires-Dist: requests<3.0.0,>=2.32.0
|
|
25
|
-
Requires-Dist: urllib3<2.
|
|
26
|
+
Requires-Dist: urllib3<2.4.0,>=2.3.0
|
|
26
27
|
Requires-Dist: python_dateutil<3.0.0,>=2.5.3
|
|
27
28
|
Requires-Dist: ibm_cloud_sdk_core<4.0.0,>=3.16.0
|
|
28
29
|
Dynamic: author
|
|
@@ -40,7 +41,7 @@ Dynamic: summary
|
|
|
40
41
|
<!--
|
|
41
42
|
[](https://github.com/semantic-release/semantic-release)
|
|
42
43
|
-->
|
|
43
|
-
# Python SDK for IBM Cloud Code Engine 4.
|
|
44
|
+
# Python SDK for IBM Cloud Code Engine 4.14.1
|
|
44
45
|
|
|
45
46
|
Python client library to interact with the [IBM Cloud Code Engine API](https://cloud.ibm.com/apidocs/codeengine).
|
|
46
47
|
|
|
@@ -77,8 +78,8 @@ IBM Cloud services:
|
|
|
77
78
|
|
|
78
79
|
Service Name | Imported Class Name
|
|
79
80
|
--- | ---
|
|
80
|
-
[IBM Cloud Code Engine V2](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.
|
|
81
|
-
[IBM Cloud Code Engine V1](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.
|
|
81
|
+
[IBM Cloud Code Engine V2](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.14.1) | CodeEngineV2
|
|
82
|
+
[IBM Cloud Code Engine V1](https://cloud.ibm.com/apidocs/codeengine/codeengine-v4.14.1) | IbmCloudCodeEngineV1
|
|
82
83
|
|
|
83
84
|
## Prerequisites
|
|
84
85
|
|
|
@@ -93,13 +94,13 @@ Service Name | Imported Class Name
|
|
|
93
94
|
To install, use `pip` or `easy_install`:
|
|
94
95
|
|
|
95
96
|
```bash
|
|
96
|
-
pip install --upgrade "ibm_code_engine_sdk>=4.
|
|
97
|
+
pip install --upgrade "ibm_code_engine_sdk>=4.14.1"
|
|
97
98
|
```
|
|
98
99
|
|
|
99
100
|
or
|
|
100
101
|
|
|
101
102
|
```bash
|
|
102
|
-
easy_install --upgrade "ibm_code_engine_sdk>=4.
|
|
103
|
+
easy_install --upgrade "ibm_code_engine_sdk>=4.14.1"
|
|
103
104
|
```
|
|
104
105
|
|
|
105
106
|
## Using the SDK
|
|
@@ -19,7 +19,7 @@ import os
|
|
|
19
19
|
import sys
|
|
20
20
|
import pkg_resources
|
|
21
21
|
|
|
22
|
-
__version__ = '4.
|
|
22
|
+
__version__ = '4.14.1'
|
|
23
23
|
PACKAGE_NAME = 'ibm_code_engine_sdk'
|
|
24
24
|
PACKAGE_DESC = 'Python SDK for IBM Cloud Code Engine'
|
|
25
25
|
|
|
@@ -63,6 +63,7 @@ setup(
|
|
|
63
63
|
'Programming Language :: Python :: 3.10',
|
|
64
64
|
'Programming Language :: Python :: 3.11',
|
|
65
65
|
'Programming Language :: Python :: 3.12',
|
|
66
|
+
'Programming Language :: Python :: 3.13',
|
|
66
67
|
'Development Status :: 5 - Production/Stable',
|
|
67
68
|
'Intended Audience :: Developers',
|
|
68
69
|
'License :: OSI Approved :: Apache Software License',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|
{ibm_code_engine_sdk-4.9.0 → ibm_code_engine_sdk-4.14.1}/ibm_code_engine_sdk.egg-info/zip-safe
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|