/*
* 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 iotfleethub-2020-11-03.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net;
using Amazon.IoTFleetHub.Model;
using Amazon.IoTFleetHub.Model.Internal.MarshallTransformations;
using Amazon.IoTFleetHub.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.IoTFleetHub
{
///
/// Implementation for accessing IoTFleetHub
///
/// With Fleet Hub for AWS IoT Device Management you can build stand-alone web applications
/// for monitoring the health of your device fleets.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
public partial class AmazonIoTFleetHubClient : AmazonServiceClient, IAmazonIoTFleetHub
{
private static IServiceMetadata serviceMetadata = new AmazonIoTFleetHubMetadata();
private IIoTFleetHubPaginatorFactory _paginators;
///
/// Paginators for the service
///
public IIoTFleetHubPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new IoTFleetHubPaginatorFactory(this);
}
return this._paginators;
}
}
#region Constructors
///
/// Constructs AmazonIoTFleetHubClient 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>
///
///
///
public AmazonIoTFleetHubClient()
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonIoTFleetHubConfig()) { }
///
/// Constructs AmazonIoTFleetHubClient 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 region to connect.
public AmazonIoTFleetHubClient(RegionEndpoint region)
: base(FallbackCredentialsFactory.GetCredentials(), new AmazonIoTFleetHubConfig{RegionEndpoint = region}) { }
///
/// Constructs AmazonIoTFleetHubClient 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 AmazonIoTFleetHubClient Configuration Object
public AmazonIoTFleetHubClient(AmazonIoTFleetHubConfig config)
: base(FallbackCredentialsFactory.GetCredentials(config), config){}
///
/// Constructs AmazonIoTFleetHubClient with AWS Credentials
///
/// AWS Credentials
public AmazonIoTFleetHubClient(AWSCredentials credentials)
: this(credentials, new AmazonIoTFleetHubConfig())
{
}
///
/// Constructs AmazonIoTFleetHubClient with AWS Credentials
///
/// AWS Credentials
/// The region to connect.
public AmazonIoTFleetHubClient(AWSCredentials credentials, RegionEndpoint region)
: this(credentials, new AmazonIoTFleetHubConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonIoTFleetHubClient with AWS Credentials and an
/// AmazonIoTFleetHubClient Configuration object.
///
/// AWS Credentials
/// The AmazonIoTFleetHubClient Configuration Object
public AmazonIoTFleetHubClient(AWSCredentials credentials, AmazonIoTFleetHubConfig clientConfig)
: base(credentials, clientConfig)
{
}
///
/// Constructs AmazonIoTFleetHubClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
public AmazonIoTFleetHubClient(string awsAccessKeyId, string awsSecretAccessKey)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonIoTFleetHubConfig())
{
}
///
/// Constructs AmazonIoTFleetHubClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The region to connect.
public AmazonIoTFleetHubClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, new AmazonIoTFleetHubConfig() {RegionEndpoint=region})
{
}
///
/// Constructs AmazonIoTFleetHubClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonIoTFleetHubClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// The AmazonIoTFleetHubClient Configuration Object
public AmazonIoTFleetHubClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonIoTFleetHubConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
{
}
///
/// Constructs AmazonIoTFleetHubClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
public AmazonIoTFleetHubClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonIoTFleetHubConfig())
{
}
///
/// Constructs AmazonIoTFleetHubClient with AWS Access Key ID and AWS Secret Key
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The region to connect.
public AmazonIoTFleetHubClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
: this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonIoTFleetHubConfig{RegionEndpoint = region})
{
}
///
/// Constructs AmazonIoTFleetHubClient with AWS Access Key ID, AWS Secret Key and an
/// AmazonIoTFleetHubClient Configuration object.
///
/// AWS Access Key ID
/// AWS Secret Access Key
/// AWS Session Token
/// The AmazonIoTFleetHubClient Configuration Object
public AmazonIoTFleetHubClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonIoTFleetHubConfig clientConfig)
: base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
{
}
#endregion
#region Overrides
///
/// Creates the signer for the service.
///
protected override AbstractAWSSigner CreateSigner()
{
return new AWS4Signer();
}
///
/// Customize the pipeline
///
///
protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline)
{
pipeline.RemoveHandler();
pipeline.AddHandlerAfter(new AmazonIoTFleetHubEndpointResolver());
}
///
/// Capture metadata for the service.
///
protected override IServiceMetadata ServiceMetadata
{
get
{
return serviceMetadata;
}
}
#endregion
#region Dispose
///
/// Disposes the service client.
///
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
#endregion
#region CreateApplication
///
/// Creates a Fleet Hub for AWS IoT Device Management web application.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the CreateApplication service method.
///
/// The response from the CreateApplication service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// A limit has been exceeded.
///
///
/// The rate exceeds the limit.
///
/// REST API Reference for CreateApplication Operation
public virtual CreateApplicationResponse CreateApplication(CreateApplicationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateApplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateApplicationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Creates a Fleet Hub for AWS IoT Device Management web application.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the CreateApplication service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the CreateApplication service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// A limit has been exceeded.
///
///
/// The rate exceeds the limit.
///
/// REST API Reference for CreateApplication Operation
public virtual Task CreateApplicationAsync(CreateApplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = CreateApplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = CreateApplicationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DeleteApplication
///
/// Deletes a Fleet Hub for AWS IoT Device Management web application.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the DeleteApplication service method.
///
/// The response from the DeleteApplication service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
///
/// The rate exceeds the limit.
///
/// REST API Reference for DeleteApplication Operation
public virtual DeleteApplicationResponse DeleteApplication(DeleteApplicationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteApplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteApplicationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Deletes a Fleet Hub for AWS IoT Device Management web application.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the DeleteApplication service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteApplication service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
///
/// The rate exceeds the limit.
///
/// REST API Reference for DeleteApplication Operation
public virtual Task DeleteApplicationAsync(DeleteApplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteApplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteApplicationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DescribeApplication
///
/// Gets information about a Fleet Hub for AWS IoT Device Management web application.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the DescribeApplication service method.
///
/// The response from the DescribeApplication service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
///
/// The rate exceeds the limit.
///
/// REST API Reference for DescribeApplication Operation
public virtual DescribeApplicationResponse DescribeApplication(DescribeApplicationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeApplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeApplicationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Gets information about a Fleet Hub for AWS IoT Device Management web application.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the DescribeApplication service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DescribeApplication service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
///
/// The rate exceeds the limit.
///
/// REST API Reference for DescribeApplication Operation
public virtual Task DescribeApplicationAsync(DescribeApplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeApplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeApplicationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListApplications
///
/// Gets a list of Fleet Hub for AWS IoT Device Management web applications for the current
/// account.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the ListApplications service method.
///
/// The response from the ListApplications service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The rate exceeds the limit.
///
/// REST API Reference for ListApplications Operation
public virtual ListApplicationsResponse ListApplications(ListApplicationsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListApplicationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListApplicationsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Gets a list of Fleet Hub for AWS IoT Device Management web applications for the current
/// account.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the ListApplications service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListApplications service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The rate exceeds the limit.
///
/// REST API Reference for ListApplications Operation
public virtual Task ListApplicationsAsync(ListApplicationsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListApplicationsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListApplicationsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListTagsForResource
///
/// Lists the tags for the specified resource.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the ListTagsForResource service method.
///
/// The response from the ListTagsForResource service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
/// REST API Reference for ListTagsForResource Operation
public virtual ListTagsForResourceResponse ListTagsForResource(ListTagsForResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Lists the tags for the specified resource.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the ListTagsForResource service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListTagsForResource service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
/// REST API Reference for ListTagsForResource Operation
public virtual Task ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region TagResource
///
/// Adds to or modifies the tags of the specified resource. Tags are metadata which can
/// be used to manage a resource.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the TagResource service method.
///
/// The response from the TagResource service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
/// REST API Reference for TagResource Operation
public virtual TagResourceResponse TagResource(TagResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = TagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Adds to or modifies the tags of the specified resource. Tags are metadata which can
/// be used to manage a resource.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the TagResource service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the TagResource service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
/// REST API Reference for TagResource Operation
public virtual Task TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = TagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region UntagResource
///
/// Removes the specified tags (metadata) from the resource.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the UntagResource service method.
///
/// The response from the UntagResource service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
/// REST API Reference for UntagResource Operation
public virtual UntagResourceResponse UntagResource(UntagResourceRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UntagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Removes the specified tags (metadata) from the resource.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the UntagResource service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UntagResource service method, as returned by IoTFleetHub.
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
/// REST API Reference for UntagResource Operation
public virtual Task UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UntagResourceRequestMarshaller.Instance;
options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region UpdateApplication
///
/// Updates information about a Fleet Hub for a AWS IoT Device Management web application.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the UpdateApplication service method.
///
/// The response from the UpdateApplication service method, as returned by IoTFleetHub.
///
/// The request conflicts with the current state of the resource.
///
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
///
/// The rate exceeds the limit.
///
/// REST API Reference for UpdateApplication Operation
public virtual UpdateApplicationResponse UpdateApplication(UpdateApplicationRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateApplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateApplicationResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Updates information about a Fleet Hub for a AWS IoT Device Management web application.
///
///
///
/// Fleet Hub for AWS IoT Device Management is in public preview and is subject to change.
///
///
///
/// Container for the necessary parameters to execute the UpdateApplication service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the UpdateApplication service method, as returned by IoTFleetHub.
///
/// The request conflicts with the current state of the resource.
///
///
/// An unexpected error has occurred.
///
///
/// The request is not valid.
///
///
/// The specified resource does not exist.
///
///
/// The rate exceeds the limit.
///
/// REST API Reference for UpdateApplication Operation
public virtual Task UpdateApplicationAsync(UpdateApplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = UpdateApplicationRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateApplicationResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
}
}