Struct aws_sdk_iot1clickprojects::Client
source · [−]pub struct Client { /* private fields */ }
Expand description
Client for AWS IoT 1-Click Projects Service
Client for invoking operations on AWS IoT 1-Click Projects Service. Each operation on AWS IoT 1-Click Projects Service is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
Examples
Constructing a client and invoking an operation
// create a shared configuration. This can be used & shared between multiple service clients.
let shared_config = aws_config::load_from_env().await;
let client = aws_sdk_iot1clickprojects::Client::new(&shared_config);
// invoke an operation
/* let rsp = client
.<operation_name>().
.<param>("some value")
.send().await; */
Constructing a client with custom configuration
use aws_config::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_iot1clickprojects::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_iot1clickprojects::Client::from_conf(config);
Implementations
sourceimpl Client
impl Client
sourcepub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
pub fn with_config(
client: Client<DynConnector, DynMiddleware<DynConnector>>,
conf: Config
) -> Self
Creates a client with the given service configuration.
sourceimpl Client
impl Client
sourcepub fn associate_device_with_placement(&self) -> AssociateDeviceWithPlacement
pub fn associate_device_with_placement(&self) -> AssociateDeviceWithPlacement
Constructs a fluent builder for the AssociateDeviceWithPlacement
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The name of the project containing the placement in which to associate the device.
placement_name(impl Into<String>)
/set_placement_name(Option<String>)
:The name of the placement in which to associate the device.
device_id(impl Into<String>)
/set_device_id(Option<String>)
:The ID of the physical device to be associated with the given placement in the project. Note that a mandatory 4 character prefix is required for all
deviceId
values.device_template_name(impl Into<String>)
/set_device_template_name(Option<String>)
:The device template name to associate with the device ID.
- On success, responds with
AssociateDeviceWithPlacementOutput
- On failure, responds with
SdkError<AssociateDeviceWithPlacementError>
sourcepub fn create_placement(&self) -> CreatePlacement
pub fn create_placement(&self) -> CreatePlacement
Constructs a fluent builder for the CreatePlacement
operation.
- The fluent builder is configurable:
placement_name(impl Into<String>)
/set_placement_name(Option<String>)
:The name of the placement to be created.
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The name of the project in which to create the placement.
attributes(HashMap<String, String>)
/set_attributes(Option<HashMap<String, String>>)
:Optional user-defined key/value pairs providing contextual data (such as location or function) for the placement.
- On success, responds with
CreatePlacementOutput
- On failure, responds with
SdkError<CreatePlacementError>
sourcepub fn create_project(&self) -> CreateProject
pub fn create_project(&self) -> CreateProject
Constructs a fluent builder for the CreateProject
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The name of the project to create.
description(impl Into<String>)
/set_description(Option<String>)
:An optional description for the project.
placement_template(PlacementTemplate)
/set_placement_template(Option<PlacementTemplate>)
:The schema defining the placement to be created. A placement template defines placement default attributes and device templates. You cannot add or remove device templates after the project has been created. However, you can update
callbackOverrides
for the device templates using theUpdateProject
API.tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:Optional tags (metadata key/value pairs) to be associated with the project. For example,
{ {“key1”: “value1”, “key2”: “value2”} }
. For more information, see AWS Tagging Strategies.
- On success, responds with
CreateProjectOutput
- On failure, responds with
SdkError<CreateProjectError>
sourcepub fn delete_placement(&self) -> DeletePlacement
pub fn delete_placement(&self) -> DeletePlacement
Constructs a fluent builder for the DeletePlacement
operation.
- The fluent builder is configurable:
placement_name(impl Into<String>)
/set_placement_name(Option<String>)
:The name of the empty placement to delete.
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The project containing the empty placement to delete.
- On success, responds with
DeletePlacementOutput
- On failure, responds with
SdkError<DeletePlacementError>
sourcepub fn delete_project(&self) -> DeleteProject
pub fn delete_project(&self) -> DeleteProject
Constructs a fluent builder for the DeleteProject
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The name of the empty project to delete.
- On success, responds with
DeleteProjectOutput
- On failure, responds with
SdkError<DeleteProjectError>
sourcepub fn describe_placement(&self) -> DescribePlacement
pub fn describe_placement(&self) -> DescribePlacement
Constructs a fluent builder for the DescribePlacement
operation.
- The fluent builder is configurable:
placement_name(impl Into<String>)
/set_placement_name(Option<String>)
:The name of the placement within a project.
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The project containing the placement to be described.
- On success, responds with
DescribePlacementOutput
with field(s):placement(Option<PlacementDescription>)
:An object describing the placement.
- On failure, responds with
SdkError<DescribePlacementError>
sourcepub fn describe_project(&self) -> DescribeProject
pub fn describe_project(&self) -> DescribeProject
Constructs a fluent builder for the DescribeProject
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The name of the project to be described.
- On success, responds with
DescribeProjectOutput
with field(s):project(Option<ProjectDescription>)
:An object describing the project.
- On failure, responds with
SdkError<DescribeProjectError>
sourcepub fn disassociate_device_from_placement(
&self
) -> DisassociateDeviceFromPlacement
pub fn disassociate_device_from_placement(
&self
) -> DisassociateDeviceFromPlacement
Constructs a fluent builder for the DisassociateDeviceFromPlacement
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The name of the project that contains the placement.
placement_name(impl Into<String>)
/set_placement_name(Option<String>)
:The name of the placement that the device should be removed from.
device_template_name(impl Into<String>)
/set_device_template_name(Option<String>)
:The device ID that should be removed from the placement.
- On success, responds with
DisassociateDeviceFromPlacementOutput
- On failure, responds with
SdkError<DisassociateDeviceFromPlacementError>
sourcepub fn get_devices_in_placement(&self) -> GetDevicesInPlacement
pub fn get_devices_in_placement(&self) -> GetDevicesInPlacement
Constructs a fluent builder for the GetDevicesInPlacement
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The name of the project containing the placement.
placement_name(impl Into<String>)
/set_placement_name(Option<String>)
:The name of the placement to get the devices from.
- On success, responds with
GetDevicesInPlacementOutput
with field(s):devices(Option<HashMap<String, String>>)
:An object containing the devices (zero or more) within the placement.
- On failure, responds with
SdkError<GetDevicesInPlacementError>
sourcepub fn list_placements(&self) -> ListPlacements
pub fn list_placements(&self) -> ListPlacements
Constructs a fluent builder for the ListPlacements
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The project containing the placements to be listed.
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to retrieve the next set of results.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return per request. If not set, a default value of 100 is used.
- On success, responds with
ListPlacementsOutput
with field(s):placements(Option<Vec<PlacementSummary>>)
:An object listing the requested placements.
next_token(Option<String>)
:The token used to retrieve the next set of results - will be effectively empty if there are no further results.
- On failure, responds with
SdkError<ListPlacementsError>
sourcepub fn list_projects(&self) -> ListProjects
pub fn list_projects(&self) -> ListProjects
Constructs a fluent builder for the ListProjects
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:The token to retrieve the next set of results.
max_results(i32)
/set_max_results(Option<i32>)
:The maximum number of results to return per request. If not set, a default value of 100 is used.
- On success, responds with
ListProjectsOutput
with field(s):projects(Option<Vec<ProjectSummary>>)
:An object containing the list of projects.
next_token(Option<String>)
:The token used to retrieve the next set of results - will be effectively empty if there are no further results.
- On failure, responds with
SdkError<ListProjectsError>
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The ARN of the resource whose tags you want to list.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap<String, String>>)
:The tags (metadata key/value pairs) which you have assigned to the resource.
- On failure, responds with
SdkError<ListTagsForResourceError>
sourcepub fn tag_resource(&self) -> TagResource
pub fn tag_resource(&self) -> TagResource
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The ARN of the resouce for which tag(s) should be added or modified.
tags(HashMap<String, String>)
/set_tags(Option<HashMap<String, String>>)
:The new or modifying tag(s) for the resource. See AWS IoT 1-Click Service Limits for the maximum number of tags allowed per resource.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
sourcepub fn untag_resource(&self) -> UntagResource
pub fn untag_resource(&self) -> UntagResource
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:The ARN of the resource whose tag you want to remove.
tag_keys(Vec<String>)
/set_tag_keys(Option<Vec<String>>)
:The keys of those tags which you want to remove.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
sourcepub fn update_placement(&self) -> UpdatePlacement
pub fn update_placement(&self) -> UpdatePlacement
Constructs a fluent builder for the UpdatePlacement
operation.
- The fluent builder is configurable:
placement_name(impl Into<String>)
/set_placement_name(Option<String>)
:The name of the placement to update.
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The name of the project containing the placement to be updated.
attributes(HashMap<String, String>)
/set_attributes(Option<HashMap<String, String>>)
:The user-defined object of attributes used to update the placement. The maximum number of key/value pairs is 50.
- On success, responds with
UpdatePlacementOutput
- On failure, responds with
SdkError<UpdatePlacementError>
sourcepub fn update_project(&self) -> UpdateProject
pub fn update_project(&self) -> UpdateProject
Constructs a fluent builder for the UpdateProject
operation.
- The fluent builder is configurable:
project_name(impl Into<String>)
/set_project_name(Option<String>)
:The name of the project to be updated.
description(impl Into<String>)
/set_description(Option<String>)
:An optional user-defined description for the project.
placement_template(PlacementTemplate)
/set_placement_template(Option<PlacementTemplate>)
:An object defining the project update. Once a project has been created, you cannot add device template names to the project. However, for a given
placementTemplate
, you can update the associatedcallbackOverrides
for the device definition using this API.
- On success, responds with
UpdateProjectOutput
- On failure, responds with
SdkError<UpdateProjectError>
sourceimpl Client
impl Client
sourcepub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
pub fn from_conf_conn<C, E>(conf: Config, conn: C) -> Self where
C: SmithyConnector<Error = E> + Send + 'static,
E: Into<ConnectorError>,
Creates a client with the given service config and connector override.
Trait Implementations
sourceimpl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
impl From<Client<DynConnector, DynMiddleware<DynConnector>, Standard>> for Client
sourcefn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
fn from(client: Client<DynConnector, DynMiddleware<DynConnector>>) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more