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 <utility> 10 11 namespace Aws 12 { 13 namespace Utils 14 { 15 namespace Json 16 { 17 class JsonValue; 18 class JsonView; 19 } // namespace Json 20 } // namespace Utils 21 namespace SageMaker 22 { 23 namespace Model 24 { 25 26 /** 27 * <p>Contains the notebook instance lifecycle configuration script.</p> <p>Each 28 * lifecycle configuration script has a limit of 16384 characters.</p> <p>The value 29 * of the <code>$PATH</code> environment variable that is available to both scripts 30 * is <code>/sbin:bin:/usr/sbin:/usr/bin</code>.</p> <p>View CloudWatch Logs for 31 * notebook instance lifecycle configurations in log group 32 * <code>/aws/sagemaker/NotebookInstances</code> in log stream 33 * <code>[notebook-instance-name]/[LifecycleConfigHook]</code>.</p> <p>Lifecycle 34 * configuration scripts cannot run for longer than 5 minutes. If a script runs for 35 * longer than 5 minutes, it fails and the notebook instance is not created or 36 * started.</p> <p>For information about notebook instance lifestyle 37 * configurations, see <a 38 * href="https://docs.aws.amazon.com/sagemaker/latest/dg/notebook-lifecycle-config.html">Step 39 * 2.1: (Optional) Customize a Notebook Instance</a>.</p><p><h3>See Also:</h3> <a 40 * href="http://docs.aws.amazon.com/goto/WebAPI/sagemaker-2017-07-24/NotebookInstanceLifecycleHook">AWS 41 * API Reference</a></p> 42 */ 43 class AWS_SAGEMAKER_API NotebookInstanceLifecycleHook 44 { 45 public: 46 NotebookInstanceLifecycleHook(); 47 NotebookInstanceLifecycleHook(Aws::Utils::Json::JsonView jsonValue); 48 NotebookInstanceLifecycleHook& operator=(Aws::Utils::Json::JsonView jsonValue); 49 Aws::Utils::Json::JsonValue Jsonize() const; 50 51 52 /** 53 * <p>A base64-encoded string that contains a shell script for a notebook instance 54 * lifecycle configuration.</p> 55 */ GetContent()56 inline const Aws::String& GetContent() const{ return m_content; } 57 58 /** 59 * <p>A base64-encoded string that contains a shell script for a notebook instance 60 * lifecycle configuration.</p> 61 */ ContentHasBeenSet()62 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; } 63 64 /** 65 * <p>A base64-encoded string that contains a shell script for a notebook instance 66 * lifecycle configuration.</p> 67 */ SetContent(const Aws::String & value)68 inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; } 69 70 /** 71 * <p>A base64-encoded string that contains a shell script for a notebook instance 72 * lifecycle configuration.</p> 73 */ SetContent(Aws::String && value)74 inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); } 75 76 /** 77 * <p>A base64-encoded string that contains a shell script for a notebook instance 78 * lifecycle configuration.</p> 79 */ SetContent(const char * value)80 inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); } 81 82 /** 83 * <p>A base64-encoded string that contains a shell script for a notebook instance 84 * lifecycle configuration.</p> 85 */ WithContent(const Aws::String & value)86 inline NotebookInstanceLifecycleHook& WithContent(const Aws::String& value) { SetContent(value); return *this;} 87 88 /** 89 * <p>A base64-encoded string that contains a shell script for a notebook instance 90 * lifecycle configuration.</p> 91 */ WithContent(Aws::String && value)92 inline NotebookInstanceLifecycleHook& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;} 93 94 /** 95 * <p>A base64-encoded string that contains a shell script for a notebook instance 96 * lifecycle configuration.</p> 97 */ WithContent(const char * value)98 inline NotebookInstanceLifecycleHook& WithContent(const char* value) { SetContent(value); return *this;} 99 100 private: 101 102 Aws::String m_content; 103 bool m_contentHasBeenSet; 104 }; 105 106 } // namespace Model 107 } // namespace SageMaker 108 } // namespace Aws 109