1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/sagemaker/SageMaker_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <aws/core/utils/memory/stl/AWSMap.h> 10 #include <utility> 11 12 namespace Aws 13 { 14 namespace Utils 15 { 16 namespace Json 17 { 18 class JsonValue; 19 class JsonView; 20 } // namespace Json 21 } // namespace Utils 22 namespace SageMaker 23 { 24 namespace Model 25 { 26 27 /** 28 * <p>Describes the Docker container for the model package.</p><p><h3>See 29 * Also:</h3> <a 30 * href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/ModelPackageContainerDefinition">AWS 31 * API Reference</a></p> 32 */ 33 class AWS_SAGEMAKER_API ModelPackageContainerDefinition 34 { 35 public: 36 ModelPackageContainerDefinition(); 37 ModelPackageContainerDefinition(Aws::Utils::Json::JsonView jsonValue); 38 ModelPackageContainerDefinition& operator=(Aws::Utils::Json::JsonView jsonValue); 39 Aws::Utils::Json::JsonValue Jsonize() const; 40 41 42 /** 43 * <p>The DNS host name for the Docker container.</p> 44 */ GetContainerHostname()45 inline const Aws::String& GetContainerHostname() const{ return m_containerHostname; } 46 47 /** 48 * <p>The DNS host name for the Docker container.</p> 49 */ ContainerHostnameHasBeenSet()50 inline bool ContainerHostnameHasBeenSet() const { return m_containerHostnameHasBeenSet; } 51 52 /** 53 * <p>The DNS host name for the Docker container.</p> 54 */ SetContainerHostname(const Aws::String & value)55 inline void SetContainerHostname(const Aws::String& value) { m_containerHostnameHasBeenSet = true; m_containerHostname = value; } 56 57 /** 58 * <p>The DNS host name for the Docker container.</p> 59 */ SetContainerHostname(Aws::String && value)60 inline void SetContainerHostname(Aws::String&& value) { m_containerHostnameHasBeenSet = true; m_containerHostname = std::move(value); } 61 62 /** 63 * <p>The DNS host name for the Docker container.</p> 64 */ SetContainerHostname(const char * value)65 inline void SetContainerHostname(const char* value) { m_containerHostnameHasBeenSet = true; m_containerHostname.assign(value); } 66 67 /** 68 * <p>The DNS host name for the Docker container.</p> 69 */ WithContainerHostname(const Aws::String & value)70 inline ModelPackageContainerDefinition& WithContainerHostname(const Aws::String& value) { SetContainerHostname(value); return *this;} 71 72 /** 73 * <p>The DNS host name for the Docker container.</p> 74 */ WithContainerHostname(Aws::String && value)75 inline ModelPackageContainerDefinition& WithContainerHostname(Aws::String&& value) { SetContainerHostname(std::move(value)); return *this;} 76 77 /** 78 * <p>The DNS host name for the Docker container.</p> 79 */ WithContainerHostname(const char * value)80 inline ModelPackageContainerDefinition& WithContainerHostname(const char* value) { SetContainerHostname(value); return *this;} 81 82 83 /** 84 * <p>The Amazon EC2 Container Registry (Amazon ECR) path where inference code is 85 * stored.</p> <p>If you are using your own custom algorithm instead of an 86 * algorithm provided by Amazon SageMaker, the inference code must meet Amazon 87 * SageMaker requirements. Amazon SageMaker supports both 88 * <code>registry/repository[:tag]</code> and 89 * <code>registry/repository[@digest]</code> image path formats. For more 90 * information, see <a 91 * href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using 92 * Your Own Algorithms with Amazon SageMaker</a>.</p> 93 */ GetImage()94 inline const Aws::String& GetImage() const{ return m_image; } 95 96 /** 97 * <p>The Amazon EC2 Container Registry (Amazon ECR) path where inference code is 98 * stored.</p> <p>If you are using your own custom algorithm instead of an 99 * algorithm provided by Amazon SageMaker, the inference code must meet Amazon 100 * SageMaker requirements. Amazon SageMaker supports both 101 * <code>registry/repository[:tag]</code> and 102 * <code>registry/repository[@digest]</code> image path formats. For more 103 * information, see <a 104 * href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using 105 * Your Own Algorithms with Amazon SageMaker</a>.</p> 106 */ ImageHasBeenSet()107 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; } 108 109 /** 110 * <p>The Amazon EC2 Container Registry (Amazon ECR) path where inference code is 111 * stored.</p> <p>If you are using your own custom algorithm instead of an 112 * algorithm provided by Amazon SageMaker, the inference code must meet Amazon 113 * SageMaker requirements. Amazon SageMaker supports both 114 * <code>registry/repository[:tag]</code> and 115 * <code>registry/repository[@digest]</code> image path formats. For more 116 * information, see <a 117 * href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using 118 * Your Own Algorithms with Amazon SageMaker</a>.</p> 119 */ SetImage(const Aws::String & value)120 inline void SetImage(const Aws::String& value) { m_imageHasBeenSet = true; m_image = value; } 121 122 /** 123 * <p>The Amazon EC2 Container Registry (Amazon ECR) path where inference code is 124 * stored.</p> <p>If you are using your own custom algorithm instead of an 125 * algorithm provided by Amazon SageMaker, the inference code must meet Amazon 126 * SageMaker requirements. Amazon SageMaker supports both 127 * <code>registry/repository[:tag]</code> and 128 * <code>registry/repository[@digest]</code> image path formats. For more 129 * information, see <a 130 * href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using 131 * Your Own Algorithms with Amazon SageMaker</a>.</p> 132 */ SetImage(Aws::String && value)133 inline void SetImage(Aws::String&& value) { m_imageHasBeenSet = true; m_image = std::move(value); } 134 135 /** 136 * <p>The Amazon EC2 Container Registry (Amazon ECR) path where inference code is 137 * stored.</p> <p>If you are using your own custom algorithm instead of an 138 * algorithm provided by Amazon SageMaker, the inference code must meet Amazon 139 * SageMaker requirements. Amazon SageMaker supports both 140 * <code>registry/repository[:tag]</code> and 141 * <code>registry/repository[@digest]</code> image path formats. For more 142 * information, see <a 143 * href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using 144 * Your Own Algorithms with Amazon SageMaker</a>.</p> 145 */ SetImage(const char * value)146 inline void SetImage(const char* value) { m_imageHasBeenSet = true; m_image.assign(value); } 147 148 /** 149 * <p>The Amazon EC2 Container Registry (Amazon ECR) path where inference code is 150 * stored.</p> <p>If you are using your own custom algorithm instead of an 151 * algorithm provided by Amazon SageMaker, the inference code must meet Amazon 152 * SageMaker requirements. Amazon SageMaker supports both 153 * <code>registry/repository[:tag]</code> and 154 * <code>registry/repository[@digest]</code> image path formats. For more 155 * information, see <a 156 * href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using 157 * Your Own Algorithms with Amazon SageMaker</a>.</p> 158 */ WithImage(const Aws::String & value)159 inline ModelPackageContainerDefinition& WithImage(const Aws::String& value) { SetImage(value); return *this;} 160 161 /** 162 * <p>The Amazon EC2 Container Registry (Amazon ECR) path where inference code is 163 * stored.</p> <p>If you are using your own custom algorithm instead of an 164 * algorithm provided by Amazon SageMaker, the inference code must meet Amazon 165 * SageMaker requirements. Amazon SageMaker supports both 166 * <code>registry/repository[:tag]</code> and 167 * <code>registry/repository[@digest]</code> image path formats. For more 168 * information, see <a 169 * href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using 170 * Your Own Algorithms with Amazon SageMaker</a>.</p> 171 */ WithImage(Aws::String && value)172 inline ModelPackageContainerDefinition& WithImage(Aws::String&& value) { SetImage(std::move(value)); return *this;} 173 174 /** 175 * <p>The Amazon EC2 Container Registry (Amazon ECR) path where inference code is 176 * stored.</p> <p>If you are using your own custom algorithm instead of an 177 * algorithm provided by Amazon SageMaker, the inference code must meet Amazon 178 * SageMaker requirements. Amazon SageMaker supports both 179 * <code>registry/repository[:tag]</code> and 180 * <code>registry/repository[@digest]</code> image path formats. For more 181 * information, see <a 182 * href="https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms.html">Using 183 * Your Own Algorithms with Amazon SageMaker</a>.</p> 184 */ WithImage(const char * value)185 inline ModelPackageContainerDefinition& WithImage(const char* value) { SetImage(value); return *this;} 186 187 188 /** 189 * <p>An MD5 hash of the training algorithm that identifies the Docker image used 190 * for training.</p> 191 */ GetImageDigest()192 inline const Aws::String& GetImageDigest() const{ return m_imageDigest; } 193 194 /** 195 * <p>An MD5 hash of the training algorithm that identifies the Docker image used 196 * for training.</p> 197 */ ImageDigestHasBeenSet()198 inline bool ImageDigestHasBeenSet() const { return m_imageDigestHasBeenSet; } 199 200 /** 201 * <p>An MD5 hash of the training algorithm that identifies the Docker image used 202 * for training.</p> 203 */ SetImageDigest(const Aws::String & value)204 inline void SetImageDigest(const Aws::String& value) { m_imageDigestHasBeenSet = true; m_imageDigest = value; } 205 206 /** 207 * <p>An MD5 hash of the training algorithm that identifies the Docker image used 208 * for training.</p> 209 */ SetImageDigest(Aws::String && value)210 inline void SetImageDigest(Aws::String&& value) { m_imageDigestHasBeenSet = true; m_imageDigest = std::move(value); } 211 212 /** 213 * <p>An MD5 hash of the training algorithm that identifies the Docker image used 214 * for training.</p> 215 */ SetImageDigest(const char * value)216 inline void SetImageDigest(const char* value) { m_imageDigestHasBeenSet = true; m_imageDigest.assign(value); } 217 218 /** 219 * <p>An MD5 hash of the training algorithm that identifies the Docker image used 220 * for training.</p> 221 */ WithImageDigest(const Aws::String & value)222 inline ModelPackageContainerDefinition& WithImageDigest(const Aws::String& value) { SetImageDigest(value); return *this;} 223 224 /** 225 * <p>An MD5 hash of the training algorithm that identifies the Docker image used 226 * for training.</p> 227 */ WithImageDigest(Aws::String && value)228 inline ModelPackageContainerDefinition& WithImageDigest(Aws::String&& value) { SetImageDigest(std::move(value)); return *this;} 229 230 /** 231 * <p>An MD5 hash of the training algorithm that identifies the Docker image used 232 * for training.</p> 233 */ WithImageDigest(const char * value)234 inline ModelPackageContainerDefinition& WithImageDigest(const char* value) { SetImageDigest(value); return *this;} 235 236 237 /** 238 * <p>The Amazon S3 path where the model artifacts, which result from model 239 * training, are stored. This path must point to a single <code>gzip</code> 240 * compressed tar archive (<code>.tar.gz</code> suffix).</p> <p>The model 241 * artifacts must be in an S3 bucket that is in the same region as the model 242 * package.</p> 243 */ GetModelDataUrl()244 inline const Aws::String& GetModelDataUrl() const{ return m_modelDataUrl; } 245 246 /** 247 * <p>The Amazon S3 path where the model artifacts, which result from model 248 * training, are stored. This path must point to a single <code>gzip</code> 249 * compressed tar archive (<code>.tar.gz</code> suffix).</p> <p>The model 250 * artifacts must be in an S3 bucket that is in the same region as the model 251 * package.</p> 252 */ ModelDataUrlHasBeenSet()253 inline bool ModelDataUrlHasBeenSet() const { return m_modelDataUrlHasBeenSet; } 254 255 /** 256 * <p>The Amazon S3 path where the model artifacts, which result from model 257 * training, are stored. This path must point to a single <code>gzip</code> 258 * compressed tar archive (<code>.tar.gz</code> suffix).</p> <p>The model 259 * artifacts must be in an S3 bucket that is in the same region as the model 260 * package.</p> 261 */ SetModelDataUrl(const Aws::String & value)262 inline void SetModelDataUrl(const Aws::String& value) { m_modelDataUrlHasBeenSet = true; m_modelDataUrl = value; } 263 264 /** 265 * <p>The Amazon S3 path where the model artifacts, which result from model 266 * training, are stored. This path must point to a single <code>gzip</code> 267 * compressed tar archive (<code>.tar.gz</code> suffix).</p> <p>The model 268 * artifacts must be in an S3 bucket that is in the same region as the model 269 * package.</p> 270 */ SetModelDataUrl(Aws::String && value)271 inline void SetModelDataUrl(Aws::String&& value) { m_modelDataUrlHasBeenSet = true; m_modelDataUrl = std::move(value); } 272 273 /** 274 * <p>The Amazon S3 path where the model artifacts, which result from model 275 * training, are stored. This path must point to a single <code>gzip</code> 276 * compressed tar archive (<code>.tar.gz</code> suffix).</p> <p>The model 277 * artifacts must be in an S3 bucket that is in the same region as the model 278 * package.</p> 279 */ SetModelDataUrl(const char * value)280 inline void SetModelDataUrl(const char* value) { m_modelDataUrlHasBeenSet = true; m_modelDataUrl.assign(value); } 281 282 /** 283 * <p>The Amazon S3 path where the model artifacts, which result from model 284 * training, are stored. This path must point to a single <code>gzip</code> 285 * compressed tar archive (<code>.tar.gz</code> suffix).</p> <p>The model 286 * artifacts must be in an S3 bucket that is in the same region as the model 287 * package.</p> 288 */ WithModelDataUrl(const Aws::String & value)289 inline ModelPackageContainerDefinition& WithModelDataUrl(const Aws::String& value) { SetModelDataUrl(value); return *this;} 290 291 /** 292 * <p>The Amazon S3 path where the model artifacts, which result from model 293 * training, are stored. This path must point to a single <code>gzip</code> 294 * compressed tar archive (<code>.tar.gz</code> suffix).</p> <p>The model 295 * artifacts must be in an S3 bucket that is in the same region as the model 296 * package.</p> 297 */ WithModelDataUrl(Aws::String && value)298 inline ModelPackageContainerDefinition& WithModelDataUrl(Aws::String&& value) { SetModelDataUrl(std::move(value)); return *this;} 299 300 /** 301 * <p>The Amazon S3 path where the model artifacts, which result from model 302 * training, are stored. This path must point to a single <code>gzip</code> 303 * compressed tar archive (<code>.tar.gz</code> suffix).</p> <p>The model 304 * artifacts must be in an S3 bucket that is in the same region as the model 305 * package.</p> 306 */ WithModelDataUrl(const char * value)307 inline ModelPackageContainerDefinition& WithModelDataUrl(const char* value) { SetModelDataUrl(value); return *this;} 308 309 310 /** 311 * <p>The Amazon Web Services Marketplace product ID of the model package.</p> 312 */ GetProductId()313 inline const Aws::String& GetProductId() const{ return m_productId; } 314 315 /** 316 * <p>The Amazon Web Services Marketplace product ID of the model package.</p> 317 */ ProductIdHasBeenSet()318 inline bool ProductIdHasBeenSet() const { return m_productIdHasBeenSet; } 319 320 /** 321 * <p>The Amazon Web Services Marketplace product ID of the model package.</p> 322 */ SetProductId(const Aws::String & value)323 inline void SetProductId(const Aws::String& value) { m_productIdHasBeenSet = true; m_productId = value; } 324 325 /** 326 * <p>The Amazon Web Services Marketplace product ID of the model package.</p> 327 */ SetProductId(Aws::String && value)328 inline void SetProductId(Aws::String&& value) { m_productIdHasBeenSet = true; m_productId = std::move(value); } 329 330 /** 331 * <p>The Amazon Web Services Marketplace product ID of the model package.</p> 332 */ SetProductId(const char * value)333 inline void SetProductId(const char* value) { m_productIdHasBeenSet = true; m_productId.assign(value); } 334 335 /** 336 * <p>The Amazon Web Services Marketplace product ID of the model package.</p> 337 */ WithProductId(const Aws::String & value)338 inline ModelPackageContainerDefinition& WithProductId(const Aws::String& value) { SetProductId(value); return *this;} 339 340 /** 341 * <p>The Amazon Web Services Marketplace product ID of the model package.</p> 342 */ WithProductId(Aws::String && value)343 inline ModelPackageContainerDefinition& WithProductId(Aws::String&& value) { SetProductId(std::move(value)); return *this;} 344 345 /** 346 * <p>The Amazon Web Services Marketplace product ID of the model package.</p> 347 */ WithProductId(const char * value)348 inline ModelPackageContainerDefinition& WithProductId(const char* value) { SetProductId(value); return *this;} 349 350 351 /** 352 * <p>The environment variables to set in the Docker container. Each key and value 353 * in the <code>Environment</code> string to string map can have length of up to 354 * 1024. We support up to 16 entries in the map.</p> 355 */ GetEnvironment()356 inline const Aws::Map<Aws::String, Aws::String>& GetEnvironment() const{ return m_environment; } 357 358 /** 359 * <p>The environment variables to set in the Docker container. Each key and value 360 * in the <code>Environment</code> string to string map can have length of up to 361 * 1024. We support up to 16 entries in the map.</p> 362 */ EnvironmentHasBeenSet()363 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; } 364 365 /** 366 * <p>The environment variables to set in the Docker container. Each key and value 367 * in the <code>Environment</code> string to string map can have length of up to 368 * 1024. We support up to 16 entries in the map.</p> 369 */ SetEnvironment(const Aws::Map<Aws::String,Aws::String> & value)370 inline void SetEnvironment(const Aws::Map<Aws::String, Aws::String>& value) { m_environmentHasBeenSet = true; m_environment = value; } 371 372 /** 373 * <p>The environment variables to set in the Docker container. Each key and value 374 * in the <code>Environment</code> string to string map can have length of up to 375 * 1024. We support up to 16 entries in the map.</p> 376 */ SetEnvironment(Aws::Map<Aws::String,Aws::String> && value)377 inline void SetEnvironment(Aws::Map<Aws::String, Aws::String>&& value) { m_environmentHasBeenSet = true; m_environment = std::move(value); } 378 379 /** 380 * <p>The environment variables to set in the Docker container. Each key and value 381 * in the <code>Environment</code> string to string map can have length of up to 382 * 1024. We support up to 16 entries in the map.</p> 383 */ WithEnvironment(const Aws::Map<Aws::String,Aws::String> & value)384 inline ModelPackageContainerDefinition& WithEnvironment(const Aws::Map<Aws::String, Aws::String>& value) { SetEnvironment(value); return *this;} 385 386 /** 387 * <p>The environment variables to set in the Docker container. Each key and value 388 * in the <code>Environment</code> string to string map can have length of up to 389 * 1024. We support up to 16 entries in the map.</p> 390 */ WithEnvironment(Aws::Map<Aws::String,Aws::String> && value)391 inline ModelPackageContainerDefinition& WithEnvironment(Aws::Map<Aws::String, Aws::String>&& value) { SetEnvironment(std::move(value)); return *this;} 392 393 /** 394 * <p>The environment variables to set in the Docker container. Each key and value 395 * in the <code>Environment</code> string to string map can have length of up to 396 * 1024. We support up to 16 entries in the map.</p> 397 */ AddEnvironment(const Aws::String & key,const Aws::String & value)398 inline ModelPackageContainerDefinition& AddEnvironment(const Aws::String& key, const Aws::String& value) { m_environmentHasBeenSet = true; m_environment.emplace(key, value); return *this; } 399 400 /** 401 * <p>The environment variables to set in the Docker container. Each key and value 402 * in the <code>Environment</code> string to string map can have length of up to 403 * 1024. We support up to 16 entries in the map.</p> 404 */ AddEnvironment(Aws::String && key,const Aws::String & value)405 inline ModelPackageContainerDefinition& AddEnvironment(Aws::String&& key, const Aws::String& value) { m_environmentHasBeenSet = true; m_environment.emplace(std::move(key), value); return *this; } 406 407 /** 408 * <p>The environment variables to set in the Docker container. Each key and value 409 * in the <code>Environment</code> string to string map can have length of up to 410 * 1024. We support up to 16 entries in the map.</p> 411 */ AddEnvironment(const Aws::String & key,Aws::String && value)412 inline ModelPackageContainerDefinition& AddEnvironment(const Aws::String& key, Aws::String&& value) { m_environmentHasBeenSet = true; m_environment.emplace(key, std::move(value)); return *this; } 413 414 /** 415 * <p>The environment variables to set in the Docker container. Each key and value 416 * in the <code>Environment</code> string to string map can have length of up to 417 * 1024. We support up to 16 entries in the map.</p> 418 */ AddEnvironment(Aws::String && key,Aws::String && value)419 inline ModelPackageContainerDefinition& AddEnvironment(Aws::String&& key, Aws::String&& value) { m_environmentHasBeenSet = true; m_environment.emplace(std::move(key), std::move(value)); return *this; } 420 421 /** 422 * <p>The environment variables to set in the Docker container. Each key and value 423 * in the <code>Environment</code> string to string map can have length of up to 424 * 1024. We support up to 16 entries in the map.</p> 425 */ AddEnvironment(const char * key,Aws::String && value)426 inline ModelPackageContainerDefinition& AddEnvironment(const char* key, Aws::String&& value) { m_environmentHasBeenSet = true; m_environment.emplace(key, std::move(value)); return *this; } 427 428 /** 429 * <p>The environment variables to set in the Docker container. Each key and value 430 * in the <code>Environment</code> string to string map can have length of up to 431 * 1024. We support up to 16 entries in the map.</p> 432 */ AddEnvironment(Aws::String && key,const char * value)433 inline ModelPackageContainerDefinition& AddEnvironment(Aws::String&& key, const char* value) { m_environmentHasBeenSet = true; m_environment.emplace(std::move(key), value); return *this; } 434 435 /** 436 * <p>The environment variables to set in the Docker container. Each key and value 437 * in the <code>Environment</code> string to string map can have length of up to 438 * 1024. We support up to 16 entries in the map.</p> 439 */ AddEnvironment(const char * key,const char * value)440 inline ModelPackageContainerDefinition& AddEnvironment(const char* key, const char* value) { m_environmentHasBeenSet = true; m_environment.emplace(key, value); return *this; } 441 442 private: 443 444 Aws::String m_containerHostname; 445 bool m_containerHostnameHasBeenSet; 446 447 Aws::String m_image; 448 bool m_imageHasBeenSet; 449 450 Aws::String m_imageDigest; 451 bool m_imageDigestHasBeenSet; 452 453 Aws::String m_modelDataUrl; 454 bool m_modelDataUrlHasBeenSet; 455 456 Aws::String m_productId; 457 bool m_productIdHasBeenSet; 458 459 Aws::Map<Aws::String, Aws::String> m_environment; 460 bool m_environmentHasBeenSet; 461 }; 462 463 } // namespace Model 464 } // namespace SageMaker 465 } // namespace Aws 466