Interface TestAuthorizationRequest.Builder

    • Method Detail

      • principal

        TestAuthorizationRequest.Builder principal​(String principal)

        The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).

        Parameters:
        principal - The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • cognitoIdentityPoolId

        TestAuthorizationRequest.Builder cognitoIdentityPoolId​(String cognitoIdentityPoolId)

        The Cognito identity pool ID.

        Parameters:
        cognitoIdentityPoolId - The Cognito identity pool ID.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • authInfos

        TestAuthorizationRequest.Builder authInfos​(Collection<AuthInfo> authInfos)

        A list of authorization info objects. Simulating authorization will create a response for each authInfo object in the list.

        Parameters:
        authInfos - A list of authorization info objects. Simulating authorization will create a response for each authInfo object in the list.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • authInfos

        TestAuthorizationRequest.Builder authInfos​(AuthInfo... authInfos)

        A list of authorization info objects. Simulating authorization will create a response for each authInfo object in the list.

        Parameters:
        authInfos - A list of authorization info objects. Simulating authorization will create a response for each authInfo object in the list.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • authInfos

        TestAuthorizationRequest.Builder authInfos​(Consumer<AuthInfo.Builder>... authInfos)

        A list of authorization info objects. Simulating authorization will create a response for each authInfo object in the list.

        This is a convenience method that creates an instance of the AuthInfo.Builder avoiding the need to create one manually via AuthInfo.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #authInfos(List).

        Parameters:
        authInfos - a consumer that will call methods on AuthInfo.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #authInfos(java.util.Collection)
      • clientId

        TestAuthorizationRequest.Builder clientId​(String clientId)

        The MQTT client ID.

        Parameters:
        clientId - The MQTT client ID.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • policyNamesToAdd

        TestAuthorizationRequest.Builder policyNamesToAdd​(Collection<String> policyNamesToAdd)

        When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.

        Parameters:
        policyNamesToAdd - When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • policyNamesToAdd

        TestAuthorizationRequest.Builder policyNamesToAdd​(String... policyNamesToAdd)

        When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.

        Parameters:
        policyNamesToAdd - When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • policyNamesToSkip

        TestAuthorizationRequest.Builder policyNamesToSkip​(Collection<String> policyNamesToSkip)

        When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.

        Parameters:
        policyNamesToSkip - When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • policyNamesToSkip

        TestAuthorizationRequest.Builder policyNamesToSkip​(String... policyNamesToSkip)

        When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.

        Parameters:
        policyNamesToSkip - When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.
        Returns:
        Returns a reference to this object so that method calls can be chained together.