Struct aws_sdk_resourceexplorer2::Client
source · pub struct Client { /* private fields */ }Expand description
Client for AWS Resource Explorer
Client for invoking operations on AWS Resource Explorer. Each operation on AWS Resource Explorer 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_resourceexplorer2::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::retry::RetryConfig;
let shared_config = aws_config::load_from_env().await;
let config = aws_sdk_resourceexplorer2::config::Builder::from(&shared_config)
.retry_config(RetryConfig::disabled())
.build();
let client = aws_sdk_resourceexplorer2::Client::from_conf(config);Implementations§
source§impl 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.
source§impl Client
impl Client
sourcepub fn associate_default_view(&self) -> AssociateDefaultView
pub fn associate_default_view(&self) -> AssociateDefaultView
Constructs a fluent builder for the AssociateDefaultView operation.
- The fluent builder is configurable:
view_arn(impl Into<String>)/set_view_arn(Option<String>):The Amazon resource name (ARN) of the view to set as the default for the Amazon Web Services Region and Amazon Web Services account in which you call this operation. The specified view must already exist in the called Region.
- On success, responds with
AssociateDefaultViewOutputwith field(s):view_arn(Option<String>):The Amazon resource name (ARN) of the view that the operation set as the default for queries made in the Amazon Web Services Region and Amazon Web Services account in which you called this operation.
- On failure, responds with
SdkError<AssociateDefaultViewError>
sourcepub fn batch_get_view(&self) -> BatchGetView
pub fn batch_get_view(&self) -> BatchGetView
Constructs a fluent builder for the BatchGetView operation.
- The fluent builder is configurable:
view_arns(Vec<String>)/set_view_arns(Option<Vec<String>>):A list of Amazon resource names (ARNs) that identify the views you want details for.
- On success, responds with
BatchGetViewOutputwith field(s):views(Option<Vec<View>>):A structure with a list of objects with details for each of the specified views.
errors(Option<Vec<BatchGetViewError>>):If any of the specified ARNs result in an error, then this structure describes the error.
- On failure, responds with
SdkError<BatchGetViewError>
sourcepub fn create_index(&self) -> CreateIndex
pub fn create_index(&self) -> CreateIndex
Constructs a fluent builder for the CreateIndex operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):This value helps ensure idempotency. Resource Explorer uses this value to prevent the accidental creation of duplicate versions. We recommend that you generate a UUID-type value to ensure the uniqueness of your views.
tags(HashMap<String, String>)/set_tags(Option<HashMap<String, String>>):The specified tags are attached only to the index created in this Amazon Web Services Region. The tags aren’t attached to any of the resources listed in the index.
- On success, responds with
CreateIndexOutputwith field(s):arn(Option<String>):The ARN of the new local index for the Region. You can reference this ARN in IAM permission policies to authorize the following operations:
DeleteIndex|GetIndex|UpdateIndexType|CreateViewstate(Option<IndexState>):Indicates the current state of the index. You can check for changes to the state for asynchronous operations by calling the
GetIndexoperation.The state can remain in the
CREATINGorUPDATINGstate for several hours as Resource Explorer discovers the information about your resources and populates the index.created_at(Option<DateTime>):The date and timestamp when the index was created.
- On failure, responds with
SdkError<CreateIndexError>
sourcepub fn create_view(&self) -> CreateView
pub fn create_view(&self) -> CreateView
Constructs a fluent builder for the CreateView operation.
- The fluent builder is configurable:
client_token(impl Into<String>)/set_client_token(Option<String>):This value helps ensure idempotency. Resource Explorer uses this value to prevent the accidental creation of duplicate versions. We recommend that you generate a UUID-type value to ensure the uniqueness of your views.
view_name(impl Into<String>)/set_view_name(Option<String>):The name of the new view. This name appears in the list of views in Resource Explorer.
The name must be no more than 64 characters long, and can include letters, digits, and the dash (-) character. The name must be unique within its Amazon Web Services Region.
included_properties(Vec<IncludedProperty>)/set_included_properties(Option<Vec<IncludedProperty>>):Specifies optional fields that you want included in search results from this view. It is a list of objects that each describe a field to include.
The default is an empty list, with no optional fields included in the results.
filters(SearchFilter)/set_filters(Option<SearchFilter>):An array of strings that specify which resources are included in the results of queries made using this view. When you use this view in a
Searchoperation, the filter string is combined with the search’sQueryStringparameter using a logicalANDoperator.For information about the supported syntax, see Search query reference for Resource Explorer in the Amazon Web Services Resource Explorer User Guide.
This query string in the context of this operation supports only filter prefixes with optional operators. It doesn’t support free-form text. For example, the string
region:us* service:ec2 -tag:stage=prodincludes all Amazon EC2 resources in any Amazon Web Services Region that begins with the lettersusand is not tagged with a keyStagethat has the valueprod.tags(HashMap<String, String>)/set_tags(Option<HashMap<String, String>>):Tag key and value pairs that are attached to the view.
- On success, responds with
CreateViewOutputwith field(s):view(Option<View>):A structure that contains the details about the new view.
- On failure, responds with
SdkError<CreateViewError>
sourcepub fn delete_index(&self) -> DeleteIndex
pub fn delete_index(&self) -> DeleteIndex
Constructs a fluent builder for the DeleteIndex operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):The Amazon resource name (ARN) of the index that you want to delete.
- On success, responds with
DeleteIndexOutputwith field(s):arn(Option<String>):The Amazon resource name (ARN) of the index that you successfully started the deletion process.
This operation is asynchronous. To check its status, call the
GetIndexoperation.state(Option<IndexState>):Indicates the current state of the index.
last_updated_at(Option<DateTime>):The date and time when you last updated this index.
- On failure, responds with
SdkError<DeleteIndexError>
sourcepub fn delete_view(&self) -> DeleteView
pub fn delete_view(&self) -> DeleteView
Constructs a fluent builder for the DeleteView operation.
- The fluent builder is configurable:
view_arn(impl Into<String>)/set_view_arn(Option<String>):The Amazon resource name (ARN) of the view that you want to delete.
- On success, responds with
DeleteViewOutputwith field(s):view_arn(Option<String>):The Amazon resource name (ARN) of the view that you successfully deleted.
- On failure, responds with
SdkError<DeleteViewError>
sourcepub fn disassociate_default_view(&self) -> DisassociateDefaultView
pub fn disassociate_default_view(&self) -> DisassociateDefaultView
Constructs a fluent builder for the DisassociateDefaultView operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
DisassociateDefaultViewOutput - On failure, responds with
SdkError<DisassociateDefaultViewError>
sourcepub fn get_default_view(&self) -> GetDefaultView
pub fn get_default_view(&self) -> GetDefaultView
Constructs a fluent builder for the GetDefaultView operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
GetDefaultViewOutputwith field(s):view_arn(Option<String>):The Amazon resource name (ARN) of the view that is the current default for the Amazon Web Services Region in which you called this operation.
- On failure, responds with
SdkError<GetDefaultViewError>
sourcepub fn get_index(&self) -> GetIndex
pub fn get_index(&self) -> GetIndex
Constructs a fluent builder for the GetIndex operation.
- The fluent builder takes no input, just
sendit. - On success, responds with
GetIndexOutputwith field(s):arn(Option<String>):The Amazon resource name (ARN) of the index.
r#type(Option<IndexType>):The type of the index in this Region. For information about the aggregator index and how it differs from a local index, see Turning on cross-Region search by creating an aggregator index.
state(Option<IndexState>):The current state of the index in this Amazon Web Services Region.
replicating_from(Option<Vec<String>>):This response value is present only if this index is
Type=AGGREGATOR.A list of the Amazon Web Services Regions that replicate their content to the index in this Region.
replicating_to(Option<Vec<String>>):This response value is present only if this index is
Type=LOCAL.The Amazon Web Services Region that contains the aggregator index, if one exists. If an aggregator index does exist then the Region in which you called this operation replicates its index information to the Region specified in this response value.
created_at(Option<DateTime>):The date and time when the index was originally created.
last_updated_at(Option<DateTime>):The date and time when the index was last updated.
tags(Option<HashMap<String, String>>):Tag key and value pairs that are attached to the index.
- On failure, responds with
SdkError<GetIndexError>
sourcepub fn get_view(&self) -> GetView
pub fn get_view(&self) -> GetView
Constructs a fluent builder for the GetView operation.
- The fluent builder is configurable:
view_arn(impl Into<String>)/set_view_arn(Option<String>):The Amazon resource name (ARN) of the view that you want information about.
- On success, responds with
GetViewOutputwith field(s):view(Option<View>):A structure that contains the details for the requested view.
tags(Option<HashMap<String, String>>):Tag key and value pairs that are attached to the view.
- On failure, responds with
SdkError<GetViewError>
sourcepub fn list_indexes(&self) -> ListIndexes
pub fn list_indexes(&self) -> ListIndexes
Constructs a fluent builder for the ListIndexes operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
r#type(IndexType)/set_type(Option<IndexType>):If specified, limits the output to only indexes of the specified Type, either
LOCALorAGGREGATOR.Use this option to discover the aggregator index for your account.
regions(Vec<String>)/set_regions(Option<Vec<String>>):If specified, limits the response to only information about the index in the specified list of Amazon Web Services Regions.
max_results(i32)/set_max_results(Option<i32>):The maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the
NextTokenresponse element is present and has a value (is not null). Include that value as theNextTokenrequest parameter in the next call to the operation to get the next part of the results.An API operation can return fewer results than the maximum even when there are more results available. You should check
NextTokenafter every operation to ensure that you receive all of the results.next_token(impl Into<String>)/set_next_token(Option<String>):The parameter for receiving additional results if you receive a
NextTokenresponse in a previous request. ANextTokenresponse indicates that more output is available. Set this parameter to the value of the previous call’sNextTokenresponse to indicate where the output should continue from.
- On success, responds with
ListIndexesOutputwith field(s):indexes(Option<Vec<Index>>):A structure that contains the details and status of each index.
next_token(Option<String>):If present, indicates that more output is available than is included in the current response. Use this value in the
NextTokenrequest parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until theNextTokenresponse element comes back asnull.
- On failure, responds with
SdkError<ListIndexesError>
sourcepub fn list_supported_resource_types(&self) -> ListSupportedResourceTypes
pub fn list_supported_resource_types(&self) -> ListSupportedResourceTypes
Constructs a fluent builder for the ListSupportedResourceTypes operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):The parameter for receiving additional results if you receive a
NextTokenresponse in a previous request. ANextTokenresponse indicates that more output is available. Set this parameter to the value of the previous call’sNextTokenresponse to indicate where the output should continue from.max_results(i32)/set_max_results(Option<i32>):The maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the
NextTokenresponse element is present and has a value (is not null). Include that value as theNextTokenrequest parameter in the next call to the operation to get the next part of the results.An API operation can return fewer results than the maximum even when there are more results available. You should check
NextTokenafter every operation to ensure that you receive all of the results.
- On success, responds with
ListSupportedResourceTypesOutputwith field(s):resource_types(Option<Vec<SupportedResourceType>>):The list of resource types supported by Resource Explorer.
next_token(Option<String>):If present, indicates that more output is available than is included in the current response. Use this value in the
NextTokenrequest parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until theNextTokenresponse element comes back asnull.
- On failure, responds with
SdkError<ListSupportedResourceTypesError>
Constructs a fluent builder for the ListTagsForResource operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)/set_resource_arn(Option<String>):The Amazon resource name (ARN) of the view or index that you want to attach tags to.
- On success, responds with
ListTagsForResourceOutputwith field(s):tags(Option<HashMap<String, String>>):The tag key and value pairs that you want to attach to the specified view or index.
- On failure, responds with
SdkError<ListTagsForResourceError>
sourcepub fn list_views(&self) -> ListViews
pub fn list_views(&self) -> ListViews
Constructs a fluent builder for the ListViews operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
next_token(impl Into<String>)/set_next_token(Option<String>):The parameter for receiving additional results if you receive a
NextTokenresponse in a previous request. ANextTokenresponse indicates that more output is available. Set this parameter to the value of the previous call’sNextTokenresponse to indicate where the output should continue from.max_results(i32)/set_max_results(Option<i32>):The maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the
NextTokenresponse element is present and has a value (is not null). Include that value as theNextTokenrequest parameter in the next call to the operation to get the next part of the results.An API operation can return fewer results than the maximum even when there are more results available. You should check
NextTokenafter every operation to ensure that you receive all of the results.
- On success, responds with
ListViewsOutputwith field(s):views(Option<Vec<String>>):The list of views available in the Amazon Web Services Region in which you called this operation.
next_token(Option<String>):If present, indicates that more output is available than is included in the current response. Use this value in the
NextTokenrequest parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until theNextTokenresponse element comes back asnull.
- On failure, responds with
SdkError<ListViewsError>
sourcepub fn search(&self) -> Search
pub fn search(&self) -> Search
Constructs a fluent builder for the Search operation.
This operation supports pagination; See into_paginator().
- The fluent builder is configurable:
query_string(impl Into<String>)/set_query_string(Option<String>):A string that includes keywords and filters that specify the resources that you want to include in the results.
For the complete syntax supported by the
QueryStringparameter, see Search query syntax reference for Resource Explorer.The search is completely case insensitive. You can specify an empty string to return all results up to the limit of 1,000 total results.
The operation can return only the first 1,000 results. If the resource you want is not included, then use a different value for
QueryStringto refine the results.max_results(i32)/set_max_results(Option<i32>):The maximum number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value appropriate to the operation. If additional items exist beyond those included in the current response, the
NextTokenresponse element is present and has a value (is not null). Include that value as theNextTokenrequest parameter in the next call to the operation to get the next part of the results.An API operation can return fewer results than the maximum even when there are more results available. You should check
NextTokenafter every operation to ensure that you receive all of the results.view_arn(impl Into<String>)/set_view_arn(Option<String>):Specifies the Amazon resource name (ARN) of the view to use for the query. If you don’t specify a value for this parameter, then the operation automatically uses the default view for the Amazon Web Services Region in which you called this operation. If the Region either doesn’t have a default view or if you don’t have permission to use the default view, then the operation fails with a
401 Unauthorizedexception.next_token(impl Into<String>)/set_next_token(Option<String>):The parameter for receiving additional results if you receive a
NextTokenresponse in a previous request. ANextTokenresponse indicates that more output is available. Set this parameter to the value of the previous call’sNextTokenresponse to indicate where the output should continue from.
- On success, responds with
SearchOutputwith field(s):resources(Option<Vec<Resource>>):The list of structures that describe the resources that match the query.
next_token(Option<String>):If present, indicates that more output is available than is included in the current response. Use this value in the
NextTokenrequest parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until theNextTokenresponse element comes back asnull.view_arn(Option<String>):The Amazon resource name (ARN) of the view that this operation used to perform the search.
count(Option<ResourceCount>):The number of resources that match the query.
- On failure, responds with
SdkError<SearchError>
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 Amazon Resource Name (ARN) of the view or index that you want to attach tags to.
tags(HashMap<String, String>)/set_tags(Option<HashMap<String, String>>):A list of tag key and value pairs that you want to attach to the specified view or index.
- 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 Amazon Resource Name (ARN) of the view or index that you want to remove tags from.
tag_keys(Vec<String>)/set_tag_keys(Option<Vec<String>>):A list of the keys for the tags that you want to remove from the specified view or index.
- On success, responds with
UntagResourceOutput - On failure, responds with
SdkError<UntagResourceError>
sourcepub fn update_index_type(&self) -> UpdateIndexType
pub fn update_index_type(&self) -> UpdateIndexType
Constructs a fluent builder for the UpdateIndexType operation.
- The fluent builder is configurable:
arn(impl Into<String>)/set_arn(Option<String>):The Amazon resource name (ARN) of the index that you want to update.
r#type(IndexType)/set_type(Option<IndexType>):The type of the index. To understand the difference between
LOCALandAGGREGATOR, see Turning on cross-Region search in the Amazon Web Services Resource Explorer User Guide.
- On success, responds with
UpdateIndexTypeOutputwith field(s):arn(Option<String>):The Amazon resource name (ARN) of the index that you updated.
r#type(Option<IndexType>):Specifies the type of the specified index after the operation completes.
state(Option<IndexState>):Indicates the state of the request to update the index. This operation is asynchronous. Call the
GetIndexoperation to check for changes.last_updated_at(Option<DateTime>):The date and timestamp when the index was last updated.
- On failure, responds with
SdkError<UpdateIndexTypeError>
sourcepub fn update_view(&self) -> UpdateView
pub fn update_view(&self) -> UpdateView
Constructs a fluent builder for the UpdateView operation.
- The fluent builder is configurable:
view_arn(impl Into<String>)/set_view_arn(Option<String>):The Amazon resource name (ARN) of the view that you want to modify.
included_properties(Vec<IncludedProperty>)/set_included_properties(Option<Vec<IncludedProperty>>):Specifies optional fields that you want included in search results from this view. It is a list of objects that each describe a field to include.
The default is an empty list, with no optional fields included in the results.
filters(SearchFilter)/set_filters(Option<SearchFilter>):An array of strings that specify which resources are included in the results of queries made using this view. When you use this view in a
Searchoperation, the filter string is combined with the search’sQueryStringparameter using a logicalANDoperator.For information about the supported syntax, see Search query reference for Resource Explorer in the Amazon Web Services Resource Explorer User Guide.
This query string in the context of this operation supports only filter prefixes with optional operators. It doesn’t support free-form text. For example, the string
region:us* service:ec2 -tag:stage=prodincludes all Amazon EC2 resources in any Amazon Web Services Region that begins with the lettersusand is not tagged with a keyStagethat has the valueprod.
- On success, responds with
UpdateViewOutputwith field(s):view(Option<View>):Details about the view that you changed with this operation.
- On failure, responds with
SdkError<UpdateViewError>
source§impl Client
impl Client
sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
Panics
- This method will panic if the
sdk_configis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
sdk_configis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it.
sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config.
Panics
- This method will panic if the
confis missing an async sleep implementation. If you experience this panic, set thesleep_implon the Config passed into this function to fix it. - This method will panic if the
confis missing an HTTP connector. If you experience this panic, set thehttp_connectoron the Config passed into this function to fix it.