grant_access

grant_access(**kwargs)

Note

This action can be used only with Windows stacks.

Grants RDP access to a Windows instance for a specified time period.

See also: AWS API Documentation

Request Syntax

response = client.grant_access(
    InstanceId='string',
    ValidForInMinutes=123
)
Parameters
  • InstanceId (string) --

    [REQUIRED]

    The instance's AWS OpsWorks Stacks ID.

  • ValidForInMinutes (integer) -- The length of time (in minutes) that the grant is valid. When the grant expires at the end of this period, the user will no longer be able to use the credentials to log in. If the user is logged in at the time, he or she automatically will be logged out.
Return type

dict

Returns

Response Syntax

{
    'TemporaryCredential': {
        'Username': 'string',
        'Password': 'string',
        'ValidForInMinutes': 123,
        'InstanceId': 'string'
    }
}

Response Structure

  • (dict) --

    Contains the response to a GrantAccess request.

    • TemporaryCredential (dict) --

      A TemporaryCredential object that contains the data needed to log in to the instance by RDP clients, such as the Microsoft Remote Desktop Connection.

      • Username (string) --

        The user name.

      • Password (string) --

        The password.

      • ValidForInMinutes (integer) --

        The length of time (in minutes) that the grant is valid. When the grant expires, at the end of this period, the user will no longer be able to use the credentials to log in. If they are logged in at the time, they will be automatically logged out.

      • InstanceId (string) --

        The instance's AWS OpsWorks Stacks ID.

Exceptions

  • OpsWorks.Client.exceptions.ValidationException
  • OpsWorks.Client.exceptions.ResourceNotFoundException