Skip to content

describe_environment_memberships async

describe_environment_memberships(
    *,
    config_overrides: Optional[AsyncCloud9ClientConfig] = None,
    user_arn: Optional[UserArn] = None,
    environment_id: Optional[EnvironmentId] = None,
    permissions: Optional[PermissionsList] = None,
    next_token: Optional[String] = None,
    max_results: Optional[MaxResults] = None,
) -> DescribeEnvironmentMembershipsResult

Gets information about environment members for an Cloud9 development environment.

Cloud9 is no longer available to new customers. Existing customers of Cloud9 can continue to use the service as normal. Learn more"

Parameters:

  • user_arn (Optional[UserArn], default: None ) –

    The Amazon Resource Name (ARN) of an individual environment member to get information about. If no value is specified, information about all environment members are returned.

  • environment_id (Optional[EnvironmentId], default: None ) –

    The ID of the environment to get environment member information about.

  • permissions (Optional[PermissionsList], default: None ) –

    The type of environment member permissions to get information about. Available values include:

    • owner: Owns the environment.

    • read-only: Has read-only access to the environment.

    • read-write: Has read-write access to the environment.

    If no value is specified, information about all environment members are returned.

  • next_token (Optional[String], default: None ) –

    During a previous call, if there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of environment members to get information about.

Raises:

Examples:

DescribeEnvironmentMemberships2 The following example gets information about the owner of the specified development environment.

>>> await client.describe_environment_memberships(permissions=['owner'], environment_id='8d9967e2f0624182b74e7690ad69ebEX')
DescribeEnvironmentMemberships3
The following example gets development environment membership information for the specified user.
>>> await client.describe_environment_memberships(user_arn='arn:aws:iam::123456789012:user/MyDemoUser')
DescribeEnvironmentMemberships1
The following example gets information about all of the environment members for the specified development environment.
>>> await client.describe_environment_memberships(environment_id='8d9967e2f0624182b74e7690ad69ebEX')
Source code in docs_src/capo_cloud9/_services/async_cloud9.py
async def describe_environment_memberships(
    self,
    *,
    config_overrides: Optional[AsyncCloud9ClientConfig] = None,
    user_arn: Optional["capo_cloud9.types.user_arn.UserArn"] = None,
    environment_id: Optional[
        "capo_cloud9.types.environment_id.EnvironmentId"
    ] = None,
    permissions: Optional[
        "capo_cloud9.types.permissions_list.PermissionsList"
    ] = None,
    next_token: Optional["capo_cloud9.types.string.String"] = None,
    max_results: Optional["capo_cloud9.types.max_results.MaxResults"] = None,
) -> "capo_cloud9.types.describe_environment_memberships_result.DescribeEnvironmentMembershipsResult":
    """<p>Gets information about environment members for an Cloud9 development environment.</p> <important> <p>Cloud9 is no longer available to new customers. Existing customers of Cloud9 can continue to use the service as normal. <a href="http://aws.amazon.com/blogs/devops/how-to-migrate-from-aws-cloud9-to-aws-ide-toolkits-or-aws-cloudshell/">Learn more"</a> </p> </important>

    Args:
        user_arn: <p>The Amazon Resource Name (ARN) of an individual environment member to get information about. If no value is specified, information about all environment members are returned.</p>
        environment_id: <p>The ID of the environment to get environment member information about.</p>
        permissions: <p>The type of environment member permissions to get information about. Available values include:</p> <ul> <li> <p> <code>owner</code>: Owns the environment.</p> </li> <li> <p> <code>read-only</code>: Has read-only access to the environment.</p> </li> <li> <p> <code>read-write</code>: Has read-write access to the environment.</p> </li> </ul> <p>If no value is specified, information about all environment members are returned.</p>
        next_token: <p>During a previous call, if there are more than 25 items in the list, only the first 25 items are returned, along with a unique string called a <i>next token</i>. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.</p>
        max_results: <p>The maximum number of environment members to get information about.</p>

    Raises:
        capo_cloud9.errors.bad_request_exception.BadRequestException: <p>The target request is invalid.</p>
        capo_cloud9.errors.conflict_exception.ConflictException: <p>A conflict occurred.</p>
        capo_cloud9.errors.forbidden_exception.ForbiddenException: <p>An access permissions issue occurred.</p>
        capo_cloud9.errors.internal_server_error_exception.InternalServerErrorException: <p>An internal server error occurred.</p>
        capo_cloud9.errors.limit_exceeded_exception.LimitExceededException: <p>A service limit was exceeded.</p>
        capo_cloud9.errors.not_found_exception.NotFoundException: <p>The target resource cannot be found.</p>
        capo_cloud9.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many service requests were made over the given time period.</p>
        capo_cloud9.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        DescribeEnvironmentMemberships2
        The following example gets information about the owner of the specified development environment.

        >>> await client.describe_environment_memberships(permissions=['owner'], environment_id='8d9967e2f0624182b74e7690ad69ebEX')
        DescribeEnvironmentMemberships3
        The following example gets development environment membership information for the specified user.

        >>> await client.describe_environment_memberships(user_arn='arn:aws:iam::123456789012:user/MyDemoUser')
        DescribeEnvironmentMemberships1
        The following example gets information about all of the environment members for the specified development environment.

        >>> await client.describe_environment_memberships(environment_id='8d9967e2f0624182b74e7690ad69ebEX')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloud9.types.describe_environment_memberships_request.DescribeEnvironmentMembershipsRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloud9.types.describe_environment_memberships_result.DescribeEnvironmentMembershipsResult"
    ]:
        import capo_cloud9._operations.aws_cloud9_workspace_management_service.describe_environment_memberships

        (
            output,
            http_response,
        ) = await capo_cloud9._operations.aws_cloud9_workspace_management_service.describe_environment_memberships.async_describe_environment_memberships(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeEnvironmentMemberships")
    )
    input_: capo_cloud9.types.describe_environment_memberships_request.DescribeEnvironmentMembershipsRequest = {}
    if user_arn is not None:
        input_["user_arn"] = user_arn
    if environment_id is not None:
        input_["environment_id"] = environment_id
    if permissions is not None:
        input_["permissions"] = permissions
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output