/*
* Copyright 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.
*/
/*
* Do not modify this file. This file is generated from the athena-2017-05-18.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.Athena.Model
{
///
/// Container for the parameters to the CreateDataCatalog operation.
/// Creates (registers) a data catalog with the specified name and properties. Catalogs
/// created are visible to all users of the same Amazon Web Services account.
///
public partial class CreateDataCatalogRequest : AmazonAthenaRequest
{
private string _description;
private string _name;
private Dictionary _parameters = new Dictionary();
private List _tags = new List();
private DataCatalogType _type;
///
/// Gets and sets the property Description.
///
/// A description of the data catalog to be created.
///
///
[AWSProperty(Min=1, Max=1024)]
public string Description
{
get { return this._description; }
set { this._description = value; }
}
// Check to see if Description property is set
internal bool IsSetDescription()
{
return this._description != null;
}
///
/// Gets and sets the property Name.
///
/// The name of the data catalog to create. The catalog name must be unique for the Amazon
/// Web Services account and can use a maximum of 127 alphanumeric, underscore, at sign,
/// or hyphen characters. The remainder of the length constraint of 256 is reserved for
/// use by Athena.
///
///
[AWSProperty(Required=true, Min=1, Max=256)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
///
/// Gets and sets the property Parameters.
///
/// Specifies the Lambda function or functions to use for creating the data catalog. This
/// is a mapping whose values depend on the catalog type.
///
/// -
///
/// For the
HIVE
data catalog type, use the following syntax. The metadata-function
/// parameter is required. The sdk-version
parameter is optional and defaults
/// to the currently supported version.
///
///
///
/// metadata-function=lambda_arn, sdk-version=version_number
///
///
/// -
///
/// For the
LAMBDA
data catalog type, use one of the following sets of required
/// parameters, but not both.
///
/// -
///
/// If you have one Lambda function that processes metadata and another for reading the
/// actual data, use the following syntax. Both parameters are required.
///
///
///
///
metadata-function=lambda_arn, record-function=lambda_arn
///
///
/// -
///
/// If you have a composite Lambda function that processes both metadata and data, use
/// the following syntax to specify your Lambda function.
///
///
///
///
function=lambda_arn
///
///
-
///
/// The
GLUE
type takes a catalog ID parameter and is required. The
/// catalog_id
is the account ID of the Amazon Web Services account to
/// which the Glue Data Catalog belongs.
///
///
///
/// catalog-id=catalog_id
///
/// -
///
/// The
GLUE
data catalog type also applies to the default AwsDataCatalog
/// that already exists in your account, of which you can have only one and cannot modify.
///
/// -
///
/// Queries that specify a Glue Data Catalog other than the default
AwsDataCatalog
/// must be run on Athena engine version 2.
///
/// -
///
/// In Regions where Athena engine version 2 is not available, creating new Glue data
/// catalogs results in an
INVALID_INPUT
error.
///
///
///
public Dictionary Parameters
{
get { return this._parameters; }
set { this._parameters = value; }
}
// Check to see if Parameters property is set
internal bool IsSetParameters()
{
return this._parameters != null && this._parameters.Count > 0;
}
///
/// Gets and sets the property Tags.
///
/// A list of comma separated tags to add to the data catalog that is created.
///
///
public List Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property Type.
///
/// The type of data catalog to create: LAMBDA
for a federated catalog, HIVE
/// for an external hive metastore, or GLUE
for an Glue Data Catalog.
///
///
[AWSProperty(Required=true)]
public DataCatalogType Type
{
get { return this._type; }
set { this._type = value; }
}
// Check to see if Type property is set
internal bool IsSetType()
{
return this._type != null;
}
}
}