/* * 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. */ using Amazon.IotData.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Amazon.IotData { public partial class AmazonIotDataClient : AmazonServiceClient { /// /// Constructs AmazonIotDataClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The URL of the search or document service. public AmazonIotDataClient(string serviceUrl) : base(FallbackCredentialsFactory.GetCredentials(true), new AmazonIotDataConfig { ServiceURL = serviceUrl }) { } /// /// Constructs AmazonIotDataClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The AmazonIotDataClient Configuration Object public AmazonIotDataClient(AmazonIotDataConfig config) : base(FallbackCredentialsFactory.GetCredentials(true), config) { } /// /// Constructs AmazonIotDataClient with AWS Credentials /// /// The URL of the search or document service. /// AWS Credentials public AmazonIotDataClient(string serviceUrl, AWSCredentials credentials) : this(credentials, new AmazonIotDataConfig { ServiceURL = serviceUrl }) { } /// /// Constructs AmazonIotDataClient with AWS Credentials and an /// AmazonIotDataClient Configuration object. /// /// AWS Credentials /// The AmazonIotDataClient Configuration Object public AmazonIotDataClient(AWSCredentials credentials, AmazonIotDataConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonIotDataClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The URL of the search or document service. public AmazonIotDataClient(string awsAccessKeyId, string awsSecretAccessKey, string serviceUrl) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonIotDataConfig { ServiceURL = serviceUrl }) { } /// /// Constructs AmazonIotDataClient with AWS Access Key ID, AWS Secret Key and an /// AmazonIotDataClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonIotDataClient Configuration Object public AmazonIotDataClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonIotDataConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonIotDataClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The URL of the search or document service. public AmazonIotDataClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, string serviceUrl) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonIotDataConfig{ ServiceURL = serviceUrl}) { } /// /// Constructs AmazonIotDataClient with AWS Access Key ID, AWS Secret Key and an /// AmazonIotDataClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonIotDataClient Configuration Object public AmazonIotDataClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonIotDataConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig) { } } }