/******************************************************************************* * Copyright 2012-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"). You may not use * this file except in compliance with the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * ***************************************************************************** * * AWS Tools for Windows (TM) PowerShell (TM) * */ using System; using System.Collections.Generic; using System.Linq; using System.Management.Automation; using System.Text; using Amazon.PowerShell.Common; using Amazon.Runtime; using Amazon.SageMaker; using Amazon.SageMaker.Model; namespace Amazon.PowerShell.Cmdlets.SM { /// /// Create a new FeatureGroup. A FeatureGroup is a group of /// Features defined in the FeatureStore to describe a Record. /// /// /// /// /// The FeatureGroup defines the schema and features contained in the FeatureGroup. /// A FeatureGroup definition is composed of a list of Features, /// a RecordIdentifierFeatureName, an EventTimeFeatureName and /// configurations for its OnlineStore and OfflineStore. Check /// Amazon /// Web Services service quotas to see the FeatureGroups quota for your /// Amazon Web Services account. /// /// You must include at least one of OnlineStoreConfig and OfflineStoreConfig /// to create a FeatureGroup. /// /// [Cmdlet("New", "SMFeatureGroup", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Medium)] [OutputType("System.String")] [AWSCmdlet("Calls the Amazon SageMaker Service CreateFeatureGroup API operation.", Operation = new[] {"CreateFeatureGroup"}, SelectReturnType = typeof(Amazon.SageMaker.Model.CreateFeatureGroupResponse))] [AWSCmdletOutput("System.String or Amazon.SageMaker.Model.CreateFeatureGroupResponse", "This cmdlet returns a System.String object.", "The service call response (type Amazon.SageMaker.Model.CreateFeatureGroupResponse) can also be referenced from properties attached to the cmdlet entry in the $AWSHistory stack." )] public partial class NewSMFeatureGroupCmdlet : AmazonSageMakerClientCmdlet, IExecutor { #region Parameter DataCatalogConfig_Catalog /// /// /// The name of the Glue table catalog. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("OfflineStoreConfig_DataCatalogConfig_Catalog")] public System.String DataCatalogConfig_Catalog { get; set; } #endregion #region Parameter DataCatalogConfig_Database /// /// /// The name of the Glue table database. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("OfflineStoreConfig_DataCatalogConfig_Database")] public System.String DataCatalogConfig_Database { get; set; } #endregion #region Parameter Description /// /// /// A free-form description of a FeatureGroup. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public System.String Description { get; set; } #endregion #region Parameter OfflineStoreConfig_DisableGlueTableCreation /// /// /// Set to True to disable the automatic creation of an Amazon Web Services /// Glue table when configuring an OfflineStore. If set to False, /// Feature Store will name the OfflineStore Glue table following Athena's /// naming recommendations.The default value is False. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public System.Boolean? OfflineStoreConfig_DisableGlueTableCreation { get; set; } #endregion #region Parameter OnlineStoreConfig_EnableOnlineStore /// /// /// Turn OnlineStore off by specifying False for the EnableOnlineStore /// flag. Turn OnlineStore on by specifying True for the EnableOnlineStore /// flag. The default value is False. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public System.Boolean? OnlineStoreConfig_EnableOnlineStore { get; set; } #endregion #region Parameter EventTimeFeatureName /// /// /// The name of the feature that stores the EventTime of a Record /// in a FeatureGroup.An EventTime is a point in time when a new event occurs that corresponds /// to the creation or update of a Record in a FeatureGroup. /// All Records in the FeatureGroup must have a corresponding /// EventTime.An EventTime can be a String or Fractional. /// /// /// #if !MODULAR [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] #else [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] [System.Management.Automation.AllowEmptyString] [System.Management.Automation.AllowNull] #endif [Amazon.PowerShell.Common.AWSRequiredParameter] public System.String EventTimeFeatureName { get; set; } #endregion #region Parameter FeatureDefinition /// /// /// A list of Feature names and types. Name and Type /// is compulsory per Feature. Valid feature FeatureTypes are Integral, Fractional /// and String.FeatureNames cannot be any of the following: is_deleted, /// write_time, api_invocation_timeYou can create up to 2,500 FeatureDefinitions per FeatureGroup. /// /// #if !MODULAR [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] #else [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] [System.Management.Automation.AllowEmptyCollection] [System.Management.Automation.AllowNull] #endif [Amazon.PowerShell.Common.AWSRequiredParameter] [Alias("FeatureDefinitions")] public Amazon.SageMaker.Model.FeatureDefinition[] FeatureDefinition { get; set; } #endregion #region Parameter FeatureGroupName /// /// /// The name of the FeatureGroup. The name must be unique within an Amazon /// Web Services Region in an Amazon Web Services account. The name: /// /// #if !MODULAR [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true)] #else [System.Management.Automation.Parameter(Position = 0, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true, Mandatory = true)] [System.Management.Automation.AllowEmptyString] [System.Management.Automation.AllowNull] #endif [Amazon.PowerShell.Common.AWSRequiredParameter] public System.String FeatureGroupName { get; set; } #endregion #region Parameter S3StorageConfig_KmsKeyId /// /// /// The Amazon Web Services Key Management Service (KMS) key ARN of the key used to encrypt /// any objects written into the OfflineStore S3 location.The IAM roleARN that is passed as a parameter to CreateFeatureGroup /// must have below permissions to the KmsKeyId: /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("OfflineStoreConfig_S3StorageConfig_KmsKeyId")] public System.String S3StorageConfig_KmsKeyId { get; set; } #endregion #region Parameter SecurityConfig_KmsKeyId /// /// /// The Amazon Web Services Key Management Service (KMS) key ARN that SageMaker Feature /// Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 server-side encryption.The caller (either user or IAM role) of CreateFeatureGroup must have /// below permissions to the OnlineStoreKmsKeyId:The caller (either user or IAM role) to all DataPlane operations (PutRecord, /// GetRecord, DeleteRecord) must have the following permissions /// to the KmsKeyId: /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("OnlineStoreConfig_SecurityConfig_KmsKeyId")] public System.String SecurityConfig_KmsKeyId { get; set; } #endregion #region Parameter RecordIdentifierFeatureName /// /// /// The name of the Feature whose value uniquely identifies a Record /// defined in the FeatureStore. Only the latest record per identifier value /// will be stored in the OnlineStore. RecordIdentifierFeatureName /// must be one of feature definitions' names.You use the RecordIdentifierFeatureName to access data in a FeatureStore.This name: /// /// #if !MODULAR [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] #else [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true, Mandatory = true)] [System.Management.Automation.AllowEmptyString] [System.Management.Automation.AllowNull] #endif [Amazon.PowerShell.Common.AWSRequiredParameter] public System.String RecordIdentifierFeatureName { get; set; } #endregion #region Parameter S3StorageConfig_ResolvedOutputS3Uri /// /// /// The S3 path where offline records are written. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("OfflineStoreConfig_S3StorageConfig_ResolvedOutputS3Uri")] public System.String S3StorageConfig_ResolvedOutputS3Uri { get; set; } #endregion #region Parameter RoleArn /// /// /// The Amazon Resource Name (ARN) of the IAM execution role used to persist data into /// the OfflineStore if an OfflineStoreConfig is provided. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public System.String RoleArn { get; set; } #endregion #region Parameter S3StorageConfig_S3Uri /// /// /// The S3 URI, or location in Amazon S3, of OfflineStore.S3 URIs have a format similar to the following: s3://example-bucket/prefix/. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("OfflineStoreConfig_S3StorageConfig_S3Uri")] public System.String S3StorageConfig_S3Uri { get; set; } #endregion #region Parameter OfflineStoreConfig_TableFormat /// /// /// Format for the offline store table. Supported formats are Glue (Default) and Apache /// Iceberg. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [AWSConstantClassSource("Amazon.SageMaker.TableFormat")] public Amazon.SageMaker.TableFormat OfflineStoreConfig_TableFormat { get; set; } #endregion #region Parameter DataCatalogConfig_TableName /// /// /// The name of the Glue table. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("OfflineStoreConfig_DataCatalogConfig_TableName")] public System.String DataCatalogConfig_TableName { get; set; } #endregion #region Parameter Tag /// /// /// Tags used to identify Features in each FeatureGroup. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("Tags")] public Amazon.SageMaker.Model.Tag[] Tag { get; set; } #endregion #region Parameter TtlDuration_Unit /// /// /// TtlDuration time unit. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("OnlineStoreConfig_TtlDuration_Unit")] [AWSConstantClassSource("Amazon.SageMaker.TtlDurationUnit")] public Amazon.SageMaker.TtlDurationUnit TtlDuration_Unit { get; set; } #endregion #region Parameter TtlDuration_Value /// /// /// TtlDuration time value. /// /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] [Alias("OnlineStoreConfig_TtlDuration_Value")] public System.Int32? TtlDuration_Value { get; set; } #endregion #region Parameter Select /// /// Use the -Select parameter to control the cmdlet output. The default value is 'FeatureGroupArn'. /// Specifying -Select '*' will result in the cmdlet returning the whole service response (Amazon.SageMaker.Model.CreateFeatureGroupResponse). /// Specifying the name of a property of type Amazon.SageMaker.Model.CreateFeatureGroupResponse will result in that property being returned. /// Specifying -Select '^ParameterName' will result in the cmdlet returning the selected cmdlet parameter value. /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public string Select { get; set; } = "FeatureGroupArn"; #endregion #region Parameter PassThru /// /// Changes the cmdlet behavior to return the value passed to the FeatureGroupName parameter. /// The -PassThru parameter is deprecated, use -Select '^FeatureGroupName' instead. This parameter will be removed in a future version. /// [System.Obsolete("The -PassThru parameter is deprecated, use -Select '^FeatureGroupName' instead. This parameter will be removed in a future version.")] [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public SwitchParameter PassThru { get; set; } #endregion #region Parameter Force /// /// This parameter overrides confirmation prompts to force /// the cmdlet to continue its operation. This parameter should always /// be used with caution. /// [System.Management.Automation.Parameter(ValueFromPipelineByPropertyName = true)] public SwitchParameter Force { get; set; } #endregion protected override void ProcessRecord() { this._AWSSignerType = "v4"; base.ProcessRecord(); var resourceIdentifiersText = FormatParameterValuesForConfirmationMsg(nameof(this.FeatureGroupName), MyInvocation.BoundParameters); if (!ConfirmShouldProceed(this.Force.IsPresent, resourceIdentifiersText, "New-SMFeatureGroup (CreateFeatureGroup)")) { return; } var context = new CmdletContext(); // allow for manipulation of parameters prior to loading into context PreExecutionContextLoad(context); #pragma warning disable CS0618, CS0612 //A class member was marked with the Obsolete attribute if (ParameterWasBound(nameof(this.Select))) { context.Select = CreateSelectDelegate(Select) ?? throw new System.ArgumentException("Invalid value for -Select parameter.", nameof(this.Select)); if (this.PassThru.IsPresent) { throw new System.ArgumentException("-PassThru cannot be used when -Select is specified.", nameof(this.Select)); } } else if (this.PassThru.IsPresent) { context.Select = (response, cmdlet) => this.FeatureGroupName; } #pragma warning restore CS0618, CS0612 //A class member was marked with the Obsolete attribute context.Description = this.Description; context.EventTimeFeatureName = this.EventTimeFeatureName; #if MODULAR if (this.EventTimeFeatureName == null && ParameterWasBound(nameof(this.EventTimeFeatureName))) { WriteWarning("You are passing $null as a value for parameter EventTimeFeatureName which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif if (this.FeatureDefinition != null) { context.FeatureDefinition = new List(this.FeatureDefinition); } #if MODULAR if (this.FeatureDefinition == null && ParameterWasBound(nameof(this.FeatureDefinition))) { WriteWarning("You are passing $null as a value for parameter FeatureDefinition which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif context.FeatureGroupName = this.FeatureGroupName; #if MODULAR if (this.FeatureGroupName == null && ParameterWasBound(nameof(this.FeatureGroupName))) { WriteWarning("You are passing $null as a value for parameter FeatureGroupName which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif context.DataCatalogConfig_Catalog = this.DataCatalogConfig_Catalog; context.DataCatalogConfig_Database = this.DataCatalogConfig_Database; context.DataCatalogConfig_TableName = this.DataCatalogConfig_TableName; context.OfflineStoreConfig_DisableGlueTableCreation = this.OfflineStoreConfig_DisableGlueTableCreation; context.S3StorageConfig_KmsKeyId = this.S3StorageConfig_KmsKeyId; context.S3StorageConfig_ResolvedOutputS3Uri = this.S3StorageConfig_ResolvedOutputS3Uri; context.S3StorageConfig_S3Uri = this.S3StorageConfig_S3Uri; context.OfflineStoreConfig_TableFormat = this.OfflineStoreConfig_TableFormat; context.OnlineStoreConfig_EnableOnlineStore = this.OnlineStoreConfig_EnableOnlineStore; context.SecurityConfig_KmsKeyId = this.SecurityConfig_KmsKeyId; context.TtlDuration_Unit = this.TtlDuration_Unit; context.TtlDuration_Value = this.TtlDuration_Value; context.RecordIdentifierFeatureName = this.RecordIdentifierFeatureName; #if MODULAR if (this.RecordIdentifierFeatureName == null && ParameterWasBound(nameof(this.RecordIdentifierFeatureName))) { WriteWarning("You are passing $null as a value for parameter RecordIdentifierFeatureName which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues."); } #endif context.RoleArn = this.RoleArn; if (this.Tag != null) { context.Tag = new List(this.Tag); } // allow further manipulation of loaded context prior to processing PostExecutionContextLoad(context); var output = Execute(context) as CmdletOutput; ProcessOutput(output); } #region IExecutor Members public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.SageMaker.Model.CreateFeatureGroupRequest(); if (cmdletContext.Description != null) { request.Description = cmdletContext.Description; } if (cmdletContext.EventTimeFeatureName != null) { request.EventTimeFeatureName = cmdletContext.EventTimeFeatureName; } if (cmdletContext.FeatureDefinition != null) { request.FeatureDefinitions = cmdletContext.FeatureDefinition; } if (cmdletContext.FeatureGroupName != null) { request.FeatureGroupName = cmdletContext.FeatureGroupName; } // populate OfflineStoreConfig var requestOfflineStoreConfigIsNull = true; request.OfflineStoreConfig = new Amazon.SageMaker.Model.OfflineStoreConfig(); System.Boolean? requestOfflineStoreConfig_offlineStoreConfig_DisableGlueTableCreation = null; if (cmdletContext.OfflineStoreConfig_DisableGlueTableCreation != null) { requestOfflineStoreConfig_offlineStoreConfig_DisableGlueTableCreation = cmdletContext.OfflineStoreConfig_DisableGlueTableCreation.Value; } if (requestOfflineStoreConfig_offlineStoreConfig_DisableGlueTableCreation != null) { request.OfflineStoreConfig.DisableGlueTableCreation = requestOfflineStoreConfig_offlineStoreConfig_DisableGlueTableCreation.Value; requestOfflineStoreConfigIsNull = false; } Amazon.SageMaker.TableFormat requestOfflineStoreConfig_offlineStoreConfig_TableFormat = null; if (cmdletContext.OfflineStoreConfig_TableFormat != null) { requestOfflineStoreConfig_offlineStoreConfig_TableFormat = cmdletContext.OfflineStoreConfig_TableFormat; } if (requestOfflineStoreConfig_offlineStoreConfig_TableFormat != null) { request.OfflineStoreConfig.TableFormat = requestOfflineStoreConfig_offlineStoreConfig_TableFormat; requestOfflineStoreConfigIsNull = false; } Amazon.SageMaker.Model.DataCatalogConfig requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig = null; // populate DataCatalogConfig var requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfigIsNull = true; requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig = new Amazon.SageMaker.Model.DataCatalogConfig(); System.String requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Catalog = null; if (cmdletContext.DataCatalogConfig_Catalog != null) { requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Catalog = cmdletContext.DataCatalogConfig_Catalog; } if (requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Catalog != null) { requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig.Catalog = requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Catalog; requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfigIsNull = false; } System.String requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Database = null; if (cmdletContext.DataCatalogConfig_Database != null) { requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Database = cmdletContext.DataCatalogConfig_Database; } if (requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Database != null) { requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig.Database = requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_Database; requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfigIsNull = false; } System.String requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_TableName = null; if (cmdletContext.DataCatalogConfig_TableName != null) { requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_TableName = cmdletContext.DataCatalogConfig_TableName; } if (requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_TableName != null) { requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig.TableName = requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig_dataCatalogConfig_TableName; requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfigIsNull = false; } // determine if requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig should be set to null if (requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfigIsNull) { requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig = null; } if (requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig != null) { request.OfflineStoreConfig.DataCatalogConfig = requestOfflineStoreConfig_offlineStoreConfig_DataCatalogConfig; requestOfflineStoreConfigIsNull = false; } Amazon.SageMaker.Model.S3StorageConfig requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig = null; // populate S3StorageConfig var requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfigIsNull = true; requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig = new Amazon.SageMaker.Model.S3StorageConfig(); System.String requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_KmsKeyId = null; if (cmdletContext.S3StorageConfig_KmsKeyId != null) { requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_KmsKeyId = cmdletContext.S3StorageConfig_KmsKeyId; } if (requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_KmsKeyId != null) { requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig.KmsKeyId = requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_KmsKeyId; requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfigIsNull = false; } System.String requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_ResolvedOutputS3Uri = null; if (cmdletContext.S3StorageConfig_ResolvedOutputS3Uri != null) { requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_ResolvedOutputS3Uri = cmdletContext.S3StorageConfig_ResolvedOutputS3Uri; } if (requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_ResolvedOutputS3Uri != null) { requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig.ResolvedOutputS3Uri = requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_ResolvedOutputS3Uri; requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfigIsNull = false; } System.String requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_S3Uri = null; if (cmdletContext.S3StorageConfig_S3Uri != null) { requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_S3Uri = cmdletContext.S3StorageConfig_S3Uri; } if (requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_S3Uri != null) { requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig.S3Uri = requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig_s3StorageConfig_S3Uri; requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfigIsNull = false; } // determine if requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig should be set to null if (requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfigIsNull) { requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig = null; } if (requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig != null) { request.OfflineStoreConfig.S3StorageConfig = requestOfflineStoreConfig_offlineStoreConfig_S3StorageConfig; requestOfflineStoreConfigIsNull = false; } // determine if request.OfflineStoreConfig should be set to null if (requestOfflineStoreConfigIsNull) { request.OfflineStoreConfig = null; } // populate OnlineStoreConfig var requestOnlineStoreConfigIsNull = true; request.OnlineStoreConfig = new Amazon.SageMaker.Model.OnlineStoreConfig(); System.Boolean? requestOnlineStoreConfig_onlineStoreConfig_EnableOnlineStore = null; if (cmdletContext.OnlineStoreConfig_EnableOnlineStore != null) { requestOnlineStoreConfig_onlineStoreConfig_EnableOnlineStore = cmdletContext.OnlineStoreConfig_EnableOnlineStore.Value; } if (requestOnlineStoreConfig_onlineStoreConfig_EnableOnlineStore != null) { request.OnlineStoreConfig.EnableOnlineStore = requestOnlineStoreConfig_onlineStoreConfig_EnableOnlineStore.Value; requestOnlineStoreConfigIsNull = false; } Amazon.SageMaker.Model.OnlineStoreSecurityConfig requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig = null; // populate SecurityConfig var requestOnlineStoreConfig_onlineStoreConfig_SecurityConfigIsNull = true; requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig = new Amazon.SageMaker.Model.OnlineStoreSecurityConfig(); System.String requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig_securityConfig_KmsKeyId = null; if (cmdletContext.SecurityConfig_KmsKeyId != null) { requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig_securityConfig_KmsKeyId = cmdletContext.SecurityConfig_KmsKeyId; } if (requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig_securityConfig_KmsKeyId != null) { requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig.KmsKeyId = requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig_securityConfig_KmsKeyId; requestOnlineStoreConfig_onlineStoreConfig_SecurityConfigIsNull = false; } // determine if requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig should be set to null if (requestOnlineStoreConfig_onlineStoreConfig_SecurityConfigIsNull) { requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig = null; } if (requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig != null) { request.OnlineStoreConfig.SecurityConfig = requestOnlineStoreConfig_onlineStoreConfig_SecurityConfig; requestOnlineStoreConfigIsNull = false; } Amazon.SageMaker.Model.TtlDuration requestOnlineStoreConfig_onlineStoreConfig_TtlDuration = null; // populate TtlDuration var requestOnlineStoreConfig_onlineStoreConfig_TtlDurationIsNull = true; requestOnlineStoreConfig_onlineStoreConfig_TtlDuration = new Amazon.SageMaker.Model.TtlDuration(); Amazon.SageMaker.TtlDurationUnit requestOnlineStoreConfig_onlineStoreConfig_TtlDuration_ttlDuration_Unit = null; if (cmdletContext.TtlDuration_Unit != null) { requestOnlineStoreConfig_onlineStoreConfig_TtlDuration_ttlDuration_Unit = cmdletContext.TtlDuration_Unit; } if (requestOnlineStoreConfig_onlineStoreConfig_TtlDuration_ttlDuration_Unit != null) { requestOnlineStoreConfig_onlineStoreConfig_TtlDuration.Unit = requestOnlineStoreConfig_onlineStoreConfig_TtlDuration_ttlDuration_Unit; requestOnlineStoreConfig_onlineStoreConfig_TtlDurationIsNull = false; } System.Int32? requestOnlineStoreConfig_onlineStoreConfig_TtlDuration_ttlDuration_Value = null; if (cmdletContext.TtlDuration_Value != null) { requestOnlineStoreConfig_onlineStoreConfig_TtlDuration_ttlDuration_Value = cmdletContext.TtlDuration_Value.Value; } if (requestOnlineStoreConfig_onlineStoreConfig_TtlDuration_ttlDuration_Value != null) { requestOnlineStoreConfig_onlineStoreConfig_TtlDuration.Value = requestOnlineStoreConfig_onlineStoreConfig_TtlDuration_ttlDuration_Value.Value; requestOnlineStoreConfig_onlineStoreConfig_TtlDurationIsNull = false; } // determine if requestOnlineStoreConfig_onlineStoreConfig_TtlDuration should be set to null if (requestOnlineStoreConfig_onlineStoreConfig_TtlDurationIsNull) { requestOnlineStoreConfig_onlineStoreConfig_TtlDuration = null; } if (requestOnlineStoreConfig_onlineStoreConfig_TtlDuration != null) { request.OnlineStoreConfig.TtlDuration = requestOnlineStoreConfig_onlineStoreConfig_TtlDuration; requestOnlineStoreConfigIsNull = false; } // determine if request.OnlineStoreConfig should be set to null if (requestOnlineStoreConfigIsNull) { request.OnlineStoreConfig = null; } if (cmdletContext.RecordIdentifierFeatureName != null) { request.RecordIdentifierFeatureName = cmdletContext.RecordIdentifierFeatureName; } if (cmdletContext.RoleArn != null) { request.RoleArn = cmdletContext.RoleArn; } if (cmdletContext.Tag != null) { request.Tags = cmdletContext.Tag; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return output; } public ExecutorContext CreateContext() { return new CmdletContext(); } #endregion #region AWS Service Operation Call private Amazon.SageMaker.Model.CreateFeatureGroupResponse CallAWSServiceOperation(IAmazonSageMaker client, Amazon.SageMaker.Model.CreateFeatureGroupRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon SageMaker Service", "CreateFeatureGroup"); try { #if DESKTOP return client.CreateFeatureGroup(request); #elif CORECLR return client.CreateFeatureGroupAsync(request).GetAwaiter().GetResult(); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } } #endregion internal partial class CmdletContext : ExecutorContext { public System.String Description { get; set; } public System.String EventTimeFeatureName { get; set; } public List FeatureDefinition { get; set; } public System.String FeatureGroupName { get; set; } public System.String DataCatalogConfig_Catalog { get; set; } public System.String DataCatalogConfig_Database { get; set; } public System.String DataCatalogConfig_TableName { get; set; } public System.Boolean? OfflineStoreConfig_DisableGlueTableCreation { get; set; } public System.String S3StorageConfig_KmsKeyId { get; set; } public System.String S3StorageConfig_ResolvedOutputS3Uri { get; set; } public System.String S3StorageConfig_S3Uri { get; set; } public Amazon.SageMaker.TableFormat OfflineStoreConfig_TableFormat { get; set; } public System.Boolean? OnlineStoreConfig_EnableOnlineStore { get; set; } public System.String SecurityConfig_KmsKeyId { get; set; } public Amazon.SageMaker.TtlDurationUnit TtlDuration_Unit { get; set; } public System.Int32? TtlDuration_Value { get; set; } public System.String RecordIdentifierFeatureName { get; set; } public System.String RoleArn { get; set; } public List Tag { get; set; } public System.Func Select { get; set; } = (response, cmdlet) => response.FeatureGroupArn; } } }