pub struct Client<C = DynConnector, M = DefaultMiddleware, R = Standard> { /* 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.

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_ram::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_ram::config::Builder::from(&shared_config)
        .retry_config(RetryConfig::disabled())
        .build();
    let client = aws_sdk_ram::Client::from_conf(config);

Implementations

Creates a client with the given service configuration.

Returns the client’s configuration.

Constructs a fluent builder for the AcceptResourceShareInvitation operation.

Constructs a fluent builder for the AssociateResourceShare operation.

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>):

      Specifies the Amazon Resoure 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>):

      Specifies the Amazon Resoure 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>):

      Specifies whether the specified permission should replace or add to the existing permission associated with the resource share. Use true to replace the current permissions. Use false to add the permission to the current 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>):

      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.

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

      Specifies the version of the RAM permission to associate with the resource share. If you don’t specify this parameter, the operation uses the version designated as the default. You can use the ListPermissionVersions operation to discover the available versions of a permission.

  • 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>

Constructs a fluent builder for the CreateResourceShare operation.

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

      Specifies the name of the resource share.

    • resource_arns(Vec<String>) / set_resource_arns(Option<Vec<String>>):

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

    • principals(Vec<String>) / set_principals(Option<Vec<String>>):

      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 Resoure 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(Vec<Tag>) / set_tags(Option<Vec<Tag>>):

      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>):

      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>):

      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.

    • permission_arns(Vec<String>) / set_permission_arns(Option<Vec<String>>):

      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.

  • 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>

Constructs a fluent builder for the DeleteResourceShare operation.

Constructs a fluent builder for the DisassociateResourceShare operation.

Constructs a fluent builder for the DisassociateResourceSharePermission operation.

Constructs a fluent builder for the EnableSharingWithAwsOrganization operation.

Constructs a fluent builder for the GetPermission operation.

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

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

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

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

      Specifies the principal.

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

      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>):

      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>

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

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

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

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>):

      Specifies the Amazon Resoure 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>):

      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>):

      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>):

      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>

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>):

      Specifies that you want to list permissions for only the specified resource type. For example, to list only permissions that apply to 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>):

      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>):

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

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>):

      Specifies the Amazon Resoure 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>):

      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>):

      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>

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>):

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

      • SELF – resources that you are sharing

      • OTHER-ACCOUNTS – resources that other accounts share with you

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

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

    • principals(Vec<String>) / set_principals(Option<Vec<String>>):

      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 Resoure 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>):

      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(Vec<String>) / set_resource_share_arns(Option<Vec<String>>):

      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>):

      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>):

      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>

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

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>):

      Specifies the Amazon Resoure 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>):

      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>):

      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>

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>):

      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>):

      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>):

      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>

Constructs a fluent builder for the PromoteResourceShareCreatedFromPolicy operation.

Constructs a fluent builder for the RejectResourceShareInvitation operation.

Constructs a fluent builder for the TagResource operation.

Constructs a fluent builder for the UntagResource operation.

Constructs a fluent builder for the UpdateResourceShare operation.

Creates a client with the given service config and connector override.

Creates a new client from a shared config.

Creates a new client from the service Config.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

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

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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

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