Struct aws_sdk_ram::client::Client

source ·
pub struct Client { /* private fields */ }
Expand description

Client for AWS Resource Access Manager

Client for invoking operations on AWS Resource Access Manager. Each operation on AWS Resource Access Manager is a method on this this struct. .send() MUST be invoked on the generated operations to dispatch the request to the service.

§Constructing a Client

A Config is required to construct a client. For most use cases, the aws-config crate should be used to automatically resolve this config using aws_config::load_from_env(), since this will resolve an SdkConfig which can be shared across multiple different AWS SDK clients. This config resolution process can be customized by calling aws_config::from_env() instead, which returns a ConfigLoader that uses the builder pattern to customize the default config.

In the simplest case, creating a client looks as follows:

let config = aws_config::load_from_env().await;
let client = aws_sdk_ram::Client::new(&config);

Occasionally, SDKs may have additional service-specific values that can be set on the Config that is absent from SdkConfig, or slightly different settings for a specific client may be desired. The Config struct implements From<&SdkConfig>, so setting these specific settings can be done as follows:

let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_ram::config::Builder::from(&sdk_config)
    .some_service_specific_setting("value")
    .build();

See the aws-config docs and Config for more information on customizing configuration.

Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.

§Using the Client

A client has a function for every operation that can be performed by the service. For example, the AcceptResourceShareInvitation operation has a Client::accept_resource_share_invitation, function which returns a builder for that operation. The fluent builder ultimately has a send() function that returns an async future that returns a result, as illustrated below:

let result = client.accept_resource_share_invitation()
    .resource_share_invitation_arn("example")
    .send()
    .await;

The underlying HTTP requests that get made by this can be modified with the customize_operation function on the fluent builder. See the customize module for more information.

Implementations§

source§

impl Client

source

pub fn accept_resource_share_invitation( &self ) -> AcceptResourceShareInvitationFluentBuilder

Constructs a fluent builder for the AcceptResourceShareInvitation operation.

source§

impl Client

source

pub fn associate_resource_share(&self) -> AssociateResourceShareFluentBuilder

Constructs a fluent builder for the AssociateResourceShare operation.

source§

impl Client

source

pub fn associate_resource_share_permission( &self ) -> AssociateResourceSharePermissionFluentBuilder

Constructs a fluent builder for the AssociateResourceSharePermission operation.

  • The fluent builder is configurable:
    • resource_share_arn(impl Into<String>) / set_resource_share_arn(Option<String>):
      required: true

      Specifies the Amazon Resource Name (ARN) of the resource share to which you want to add or replace permissions.


    • permission_arn(impl Into<String>) / set_permission_arn(Option<String>):
      required: true

      Specifies the Amazon Resource Name (ARN) of the RAM permission to associate with the resource share. To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and then choose the name of the permission. The ARN is displayed on the detail page.


    • replace(bool) / set_replace(Option<bool>):
      required: false

      Specifies whether the specified permission should replace the existing permission associated with the resource share. Use true to replace the current permissions. Use false to add the permission to a resource share that currently doesn’t have a permission. The default value is false.

      A resource share can have only one permission per resource type. If a resource share already has a permission for the specified resource type and you don’t set replace to true then the operation returns an error. This helps prevent accidental overwriting of a permission.


    • client_token(impl Into<String>) / set_client_token(Option<String>):
      required: false

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don’t provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.


    • permission_version(i32) / set_permission_version(Option<i32>):
      required: false

      Specifies the version of the RAM permission to associate with the resource share. You can specify only the version that is currently set as the default version for the permission. If you also set the replace pararameter to true, then this operation updates an outdated version of the permission to the current default version.

      You don’t need to specify this parameter because the default behavior is to use the version that is currently set as the default version for the permission. This parameter is supported for backwards compatibility.


  • On success, responds with AssociateResourceSharePermissionOutput with field(s):
    • return_value(Option<bool>):

      A return value of true indicates that the request succeeded. A value of false indicates that the request failed.

    • client_token(Option<String>):

      The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

  • On failure, responds with SdkError<AssociateResourceSharePermissionError>
source§

impl Client

source

pub fn create_permission(&self) -> CreatePermissionFluentBuilder

Constructs a fluent builder for the CreatePermission operation.

  • The fluent builder is configurable:
    • name(impl Into<String>) / set_name(Option<String>):
      required: true

      Specifies the name of the customer managed permission. The name must be unique within the Amazon Web Services Region.


    • resource_type(impl Into<String>) / set_resource_type(Option<String>):
      required: true

      Specifies the name of the resource type that this customer managed permission applies to.

      The format is : and is not case sensitive. For example, to specify an Amazon EC2 Subnet, you can use the string ec2:subnet. To see the list of valid values for this parameter, query the ListResourceTypes operation.


    • policy_template(impl Into<String>) / set_policy_template(Option<String>):
      required: true

      A string in JSON format string that contains the following elements of a resource-based policy:

      • Effect: must be set to ALLOW.

      • Action: specifies the actions that are allowed by this customer managed permission. The list must contain only actions that are supported by the specified resource type. For a list of all actions supported by each resource type, see Actions, resources, and condition keys for Amazon Web Services services in the Identity and Access Management User Guide.

      • Condition: (optional) specifies conditional parameters that must evaluate to true when a user attempts an action for that action to be allowed. For more information about the Condition element, see IAM policies: Condition element in the Identity and Access Management User Guide.

      This template can’t include either the Resource or Principal elements. Those are both filled in by RAM when it instantiates the resource-based policy on each resource shared using this managed permission. The Resource comes from the ARN of the specific resource that you are sharing. The Principal comes from the list of identities added to the resource share.


    • client_token(impl Into<String>) / set_client_token(Option<String>):
      required: false

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don’t provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.


    • tags(Tag) / set_tags(Option<Vec::<Tag>>):
      required: false

      Specifies a list of one or more tag key and value pairs to attach to the permission.


  • On success, responds with CreatePermissionOutput with field(s):
    • permission(Option<ResourceSharePermissionSummary>):

      A structure with information about this customer managed permission.

    • client_token(Option<String>):

      The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

  • On failure, responds with SdkError<CreatePermissionError>
source§

impl Client

source

pub fn create_permission_version(&self) -> CreatePermissionVersionFluentBuilder

Constructs a fluent builder for the CreatePermissionVersion operation.

  • The fluent builder is configurable:
    • permission_arn(impl Into<String>) / set_permission_arn(Option<String>):
      required: true

      Specifies the Amazon Resource Name (ARN) of the customer managed permission you’re creating a new version for.


    • policy_template(impl Into<String>) / set_policy_template(Option<String>):
      required: true

      A string in JSON format string that contains the following elements of a resource-based policy:

      • Effect: must be set to ALLOW.

      • Action: specifies the actions that are allowed by this customer managed permission. The list must contain only actions that are supported by the specified resource type. For a list of all actions supported by each resource type, see Actions, resources, and condition keys for Amazon Web Services services in the Identity and Access Management User Guide.

      • Condition: (optional) specifies conditional parameters that must evaluate to true when a user attempts an action for that action to be allowed. For more information about the Condition element, see IAM policies: Condition element in the Identity and Access Management User Guide.

      This template can’t include either the Resource or Principal elements. Those are both filled in by RAM when it instantiates the resource-based policy on each resource shared using this managed permission. The Resource comes from the ARN of the specific resource that you are sharing. The Principal comes from the list of identities added to the resource share.


    • client_token(impl Into<String>) / set_client_token(Option<String>):
      required: false

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don’t provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.


  • On success, responds with CreatePermissionVersionOutput with field(s):
    • permission(Option<ResourceSharePermissionDetail>):

      Information about a RAM managed permission.

    • client_token(Option<String>):

      The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

  • On failure, responds with SdkError<CreatePermissionVersionError>
source§

impl Client

source

pub fn create_resource_share(&self) -> CreateResourceShareFluentBuilder

Constructs a fluent builder for the CreateResourceShare operation.

  • The fluent builder is configurable:
    • name(impl Into<String>) / set_name(Option<String>):
      required: true

      Specifies the name of the resource share.


    • resource_arns(impl Into<String>) / set_resource_arns(Option<Vec::<String>>):
      required: false

      Specifies a list of one or more ARNs of the resources to associate with the resource share.


    • principals(impl Into<String>) / set_principals(Option<Vec::<String>>):
      required: false

      Specifies a list of one or more principals to associate with the resource share.

      You can include the following values:

      • An Amazon Web Services account ID, for example: 123456789012

      • An Amazon Resource Name (ARN) of an organization in Organizations, for example: organizations::123456789012:organization/o-exampleorgid

      • An ARN of an organizational unit (OU) in Organizations, for example: organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123

      • An ARN of an IAM role, for example: iam::123456789012:role/rolename

      • An ARN of an IAM user, for example: iam::123456789012user/username

      Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.


    • tags(Tag) / set_tags(Option<Vec::<Tag>>):
      required: false

      Specifies one or more tags to attach to the resource share itself. It doesn’t attach the tags to the resources associated with the resource share.


    • allow_external_principals(bool) / set_allow_external_principals(Option<bool>):
      required: false

      Specifies whether principals outside your organization in Organizations can be associated with a resource share. A value of true lets you share with individual Amazon Web Services accounts that are not in your organization. A value of false only has meaning if your account is a member of an Amazon Web Services Organization. The default value is true.


    • client_token(impl Into<String>) / set_client_token(Option<String>):
      required: false

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don’t provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.


    • permission_arns(impl Into<String>) / set_permission_arns(Option<Vec::<String>>):
      required: false

      Specifies the Amazon Resource Names (ARNs) of the RAM permission to associate with the resource share. If you do not specify an ARN for the permission, RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.


    • sources(impl Into<String>) / set_sources(Option<Vec::<String>>):
      required: false

      Specifies from which source accounts the service principal has access to the resources in this resource share.


  • On success, responds with CreateResourceShareOutput with field(s):
    • resource_share(Option<ResourceShare>):

      An object with information about the new resource share.

    • client_token(Option<String>):

      The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

  • On failure, responds with SdkError<CreateResourceShareError>
source§

impl Client

source

pub fn delete_permission(&self) -> DeletePermissionFluentBuilder

Constructs a fluent builder for the DeletePermission operation.

source§

impl Client

source

pub fn delete_permission_version(&self) -> DeletePermissionVersionFluentBuilder

Constructs a fluent builder for the DeletePermissionVersion operation.

  • The fluent builder is configurable:
    • permission_arn(impl Into<String>) / set_permission_arn(Option<String>):
      required: true

      Specifies the Amazon Resource Name (ARN) of the permission with the version you want to delete.


    • permission_version(i32) / set_permission_version(Option<i32>):
      required: true

      Specifies the version number to delete.

      You can’t delete the default version for a customer managed permission.

      You can’t delete a version if it’s the only version of the permission. You must either first create another version, or delete the permission completely.

      You can’t delete a version if it is attached to any resource shares. If the version is the default, you must first use SetDefaultPermissionVersion to set a different version as the default for the customer managed permission, and then use AssociateResourceSharePermission to update your resource shares to use the new default version.


    • client_token(impl Into<String>) / set_client_token(Option<String>):
      required: false

      Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

      If you don’t provide this value, then Amazon Web Services generates a random one for you.

      If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.


  • On success, responds with DeletePermissionVersionOutput with field(s):
    • return_value(Option<bool>):

      A boolean value that indicates whether the operation is successful.

    • client_token(Option<String>):

      The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

    • permission_status(Option<PermissionStatus>):

      This operation is performed asynchronously, and this response parameter indicates the current status.

  • On failure, responds with SdkError<DeletePermissionVersionError>
source§

impl Client

source

pub fn delete_resource_share(&self) -> DeleteResourceShareFluentBuilder

Constructs a fluent builder for the DeleteResourceShare operation.

  • The fluent builder is configurable:
  • On success, responds with DeleteResourceShareOutput with field(s):
    • return_value(Option<bool>):

      A return value of true indicates that the request succeeded. A value of false indicates that the request failed.

    • client_token(Option<String>):

      The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

  • On failure, responds with SdkError<DeleteResourceShareError>
source§

impl Client

source

pub fn disassociate_resource_share( &self ) -> DisassociateResourceShareFluentBuilder

Constructs a fluent builder for the DisassociateResourceShare operation.

source§

impl Client

source

pub fn disassociate_resource_share_permission( &self ) -> DisassociateResourceSharePermissionFluentBuilder

Constructs a fluent builder for the DisassociateResourceSharePermission operation.

source§

impl Client

source

pub fn enable_sharing_with_aws_organization( &self ) -> EnableSharingWithAwsOrganizationFluentBuilder

Constructs a fluent builder for the EnableSharingWithAwsOrganization operation.

source§

impl Client

source

pub fn get_permission(&self) -> GetPermissionFluentBuilder

Constructs a fluent builder for the GetPermission operation.

source§

impl Client

source

pub fn get_resource_policies(&self) -> GetResourcePoliciesFluentBuilder

Constructs a fluent builder for the GetResourcePolicies operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • resource_arns(impl Into<String>) / set_resource_arns(Option<Vec::<String>>):
      required: true

      Specifies the Amazon Resource Names (ARNs) of the resources whose policies you want to retrieve.


    • principal(impl Into<String>) / set_principal(Option<String>):
      required: false

      Specifies the principal.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call’s NextToken response to request the next page of results.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      Specifies the total 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 that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.


  • On success, responds with GetResourcePoliciesOutput with field(s):
    • policies(Option<Vec::<String>>):

      An array of resource policy documents in JSON format.

    • next_token(Option<String>):

      If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

  • On failure, responds with SdkError<GetResourcePoliciesError>
source§

impl Client

source

pub fn get_resource_share_associations( &self ) -> GetResourceShareAssociationsFluentBuilder

Constructs a fluent builder for the GetResourceShareAssociations operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn get_resource_share_invitations( &self ) -> GetResourceShareInvitationsFluentBuilder

Constructs a fluent builder for the GetResourceShareInvitations operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn get_resource_shares(&self) -> GetResourceSharesFluentBuilder

Constructs a fluent builder for the GetResourceShares operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_pending_invitation_resources( &self ) -> ListPendingInvitationResourcesFluentBuilder

Constructs a fluent builder for the ListPendingInvitationResources operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • resource_share_invitation_arn(impl Into<String>) / set_resource_share_invitation_arn(Option<String>):
      required: true

      Specifies the Amazon Resource Name (ARN) of the invitation. You can use GetResourceShareInvitations to find the ARN of the invitation.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call’s NextToken response to request the next page of results.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      Specifies the total 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 that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.


    • resource_region_scope(ResourceRegionScopeFilter) / set_resource_region_scope(Option<ResourceRegionScopeFilter>):
      required: false

      Specifies that you want the results to include only resources that have the specified scope.

      • ALL – the results include both global and regional resources or resource types.

      • GLOBAL – the results include only global resources or resource types.

      • REGIONAL – the results include only regional resources or resource types.

      The default value is ALL.


  • On success, responds with ListPendingInvitationResourcesOutput with field(s):
    • resources(Option<Vec::<Resource>>):

      An array of objects that contain the information about the resources included the specified resource share.

    • next_token(Option<String>):

      If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

  • On failure, responds with SdkError<ListPendingInvitationResourcesError>
source§

impl Client

source

pub fn list_permission_associations( &self ) -> ListPermissionAssociationsFluentBuilder

Constructs a fluent builder for the ListPermissionAssociations operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_permission_versions(&self) -> ListPermissionVersionsFluentBuilder

Constructs a fluent builder for the ListPermissionVersions operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • permission_arn(impl Into<String>) / set_permission_arn(Option<String>):
      required: true

      Specifies the Amazon Resource Name (ARN) of the RAM permission whose versions you want to list. You can use the permissionVersion parameter on the AssociateResourceSharePermission operation to specify a non-default version to attach.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call’s NextToken response to request the next page of results.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      Specifies the total 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 that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.


  • On success, responds with ListPermissionVersionsOutput with field(s):
    • permissions(Option<Vec::<ResourceSharePermissionSummary>>):

      An array of objects that contain details for each of the available versions.

    • next_token(Option<String>):

      If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

  • On failure, responds with SdkError<ListPermissionVersionsError>
source§

impl Client

source

pub fn list_permissions(&self) -> ListPermissionsFluentBuilder

Constructs a fluent builder for the ListPermissions operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • resource_type(impl Into<String>) / set_resource_type(Option<String>):
      required: false

      Specifies that you want to list only those permissions that apply to the specified resource type. This parameter is not case sensitive.

      For example, to list only permissions that apply to Amazon EC2 subnets, specify ec2:subnet. You can use the ListResourceTypes operation to get the specific string required.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call’s NextToken response to request the next page of results.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      Specifies the total 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 that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.


    • permission_type(PermissionTypeFilter) / set_permission_type(Option<PermissionTypeFilter>):
      required: false

      Specifies that you want to list only permissions of this type:

      • AWS – returns only Amazon Web Services managed permissions.

      • LOCAL – returns only customer managed permissions

      • ALL – returns both Amazon Web Services managed permissions and customer managed permissions.

      If you don’t specify this parameter, the default is All.


  • On success, responds with ListPermissionsOutput with field(s):
    • permissions(Option<Vec::<ResourceSharePermissionSummary>>):

      An array of objects with information about the permissions.

    • next_token(Option<String>):

      If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

  • On failure, responds with SdkError<ListPermissionsError>
source§

impl Client

source

pub fn list_principals(&self) -> ListPrincipalsFluentBuilder

Constructs a fluent builder for the ListPrincipals operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • resource_owner(ResourceOwner) / set_resource_owner(Option<ResourceOwner>):
      required: true

      Specifies that you want to list information for only resource shares that match the following:

      • SELF – principals that your account is sharing resources with

      • OTHER-ACCOUNTS – principals that are sharing resources with your account


    • resource_arn(impl Into<String>) / set_resource_arn(Option<String>):
      required: false

      Specifies that you want to list principal information for the resource share with the specified Amazon Resource Name (ARN).


    • principals(impl Into<String>) / set_principals(Option<Vec::<String>>):
      required: false

      Specifies that you want to list information for only the listed principals.

      You can include the following values:

      • An Amazon Web Services account ID, for example: 123456789012

      • An Amazon Resource Name (ARN) of an organization in Organizations, for example: organizations::123456789012:organization/o-exampleorgid

      • An ARN of an organizational unit (OU) in Organizations, for example: organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123

      • An ARN of an IAM role, for example: iam::123456789012:role/rolename

      • An ARN of an IAM user, for example: iam::123456789012user/username

      Not all resource types can be shared with IAM roles and users. For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.


    • resource_type(impl Into<String>) / set_resource_type(Option<String>):
      required: false

      Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.

      For a list of valid values, query the ListResourceTypes operation.


    • resource_share_arns(impl Into<String>) / set_resource_share_arns(Option<Vec::<String>>):
      required: false

      Specifies that you want to list information for only principals associated with the resource shares specified by a list the Amazon Resource Names (ARNs).


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call’s NextToken response to request the next page of results.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      Specifies the total 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 that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.


  • On success, responds with ListPrincipalsOutput with field(s):
    • principals(Option<Vec::<Principal>>):

      An array of objects that contain the details about the principals.

    • next_token(Option<String>):

      If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

  • On failure, responds with SdkError<ListPrincipalsError>
source§

impl Client

source

pub fn list_replace_permission_associations_work( &self ) -> ListReplacePermissionAssociationsWorkFluentBuilder

Constructs a fluent builder for the ListReplacePermissionAssociationsWork operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn list_resource_share_permissions( &self ) -> ListResourceSharePermissionsFluentBuilder

Constructs a fluent builder for the ListResourceSharePermissions operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • resource_share_arn(impl Into<String>) / set_resource_share_arn(Option<String>):
      required: true

      Specifies the Amazon Resource Name (ARN) of the resource share for which you want to retrieve the associated permissions.


    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call’s NextToken response to request the next page of results.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      Specifies the total 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 that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.


  • On success, responds with ListResourceSharePermissionsOutput with field(s):
    • permissions(Option<Vec::<ResourceSharePermissionSummary>>):

      An array of objects that describe the permissions associated with the resource share.

    • next_token(Option<String>):

      If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

  • On failure, responds with SdkError<ListResourceSharePermissionsError>
source§

impl Client

source

pub fn list_resource_types(&self) -> ListResourceTypesFluentBuilder

Constructs a fluent builder for the ListResourceTypes operation. This operation supports pagination; See into_paginator().

  • The fluent builder is configurable:
    • next_token(impl Into<String>) / set_next_token(Option<String>):
      required: false

      Specifies that you want to receive the next page of results. Valid only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call’s NextToken response to request the next page of results.


    • max_results(i32) / set_max_results(Option<i32>):
      required: false

      Specifies the total 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 that is specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check NextToken after every operation to ensure that you receive all of the results.


    • resource_region_scope(ResourceRegionScopeFilter) / set_resource_region_scope(Option<ResourceRegionScopeFilter>):
      required: false

      Specifies that you want the results to include only resources that have the specified scope.

      • ALL – the results include both global and regional resources or resource types.

      • GLOBAL – the results include only global resources or resource types.

      • REGIONAL – the results include only regional resources or resource types.

      The default value is ALL.


  • On success, responds with ListResourceTypesOutput with field(s):
    • resource_types(Option<Vec::<ServiceNameAndResourceType>>):

      An array of objects that contain information about the resource types that can be shared using RAM.

    • next_token(Option<String>):

      If present, this value indicates that more output is available than is included in the current response. Use this value in the NextToken request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the NextToken response element comes back as null. This indicates that this is the last page of results.

  • On failure, responds with SdkError<ListResourceTypesError>
source§

impl Client

source

pub fn list_resources(&self) -> ListResourcesFluentBuilder

Constructs a fluent builder for the ListResources operation. This operation supports pagination; See into_paginator().

source§

impl Client

source

pub fn promote_permission_created_from_policy( &self ) -> PromotePermissionCreatedFromPolicyFluentBuilder

Constructs a fluent builder for the PromotePermissionCreatedFromPolicy operation.

source§

impl Client

source

pub fn promote_resource_share_created_from_policy( &self ) -> PromoteResourceShareCreatedFromPolicyFluentBuilder

Constructs a fluent builder for the PromoteResourceShareCreatedFromPolicy operation.

source§

impl Client

source

pub fn reject_resource_share_invitation( &self ) -> RejectResourceShareInvitationFluentBuilder

Constructs a fluent builder for the RejectResourceShareInvitation operation.

source§

impl Client

source

pub fn replace_permission_associations( &self ) -> ReplacePermissionAssociationsFluentBuilder

Constructs a fluent builder for the ReplacePermissionAssociations operation.

source§

impl Client

source

pub fn set_default_permission_version( &self ) -> SetDefaultPermissionVersionFluentBuilder

Constructs a fluent builder for the SetDefaultPermissionVersion operation.

source§

impl Client

source

pub fn tag_resource(&self) -> TagResourceFluentBuilder

Constructs a fluent builder for the TagResource operation.

source§

impl Client

source

pub fn untag_resource(&self) -> UntagResourceFluentBuilder

Constructs a fluent builder for the UntagResource operation.

source§

impl Client

source

pub fn update_resource_share(&self) -> UpdateResourceShareFluentBuilder

Constructs a fluent builder for the UpdateResourceShare operation.

source§

impl Client

source

pub fn from_conf(conf: Config) -> Self

Creates a new client from the service Config.

§Panics

This method will panic in the following cases:

  • Retries or timeouts are enabled without a sleep_impl configured.
  • Identity caching is enabled without a sleep_impl and time_source configured.
  • No behavior_version is provided.

The panic message for each of these will have instructions on how to resolve them.

source

pub fn config(&self) -> &Config

Returns the client’s configuration.

source§

impl Client

source

pub fn new(sdk_config: &SdkConfig) -> Self

Creates a new client from an SDK Config.

§Panics
  • This method will panic if the sdk_config is missing an async sleep implementation. If you experience this panic, set the sleep_impl on the Config passed into this function to fix it.
  • This method will panic if the sdk_config is missing an HTTP connector. If you experience this panic, set the http_connector on the Config passed into this function to fix it.
  • This method will panic if no BehaviorVersion is provided. If you experience this panic, set behavior_version on the Config or enable the behavior-version-latest Cargo feature.

Trait Implementations§

source§

impl Clone for Client

source§

fn clone(&self) -> Client

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Client

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more