1. Packages
  2. AWS Classic
  3. API Docs
  4. vpclattice
  5. getAuthPolicy

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

aws.vpclattice.getAuthPolicy

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi

    Data source for managing an AWS VPC Lattice Auth Policy.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const test = aws.vpclattice.getAuthPolicy({
        resourceIdentifier: testAwsVpclatticeAuthPolicy.resourceIdentifier,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    test = aws.vpclattice.get_auth_policy(resource_identifier=test_aws_vpclattice_auth_policy["resourceIdentifier"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vpclattice.LookupAuthPolicy(ctx, &vpclattice.LookupAuthPolicyArgs{
    			ResourceIdentifier: testAwsVpclatticeAuthPolicy.ResourceIdentifier,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var test = Aws.VpcLattice.GetAuthPolicy.Invoke(new()
        {
            ResourceIdentifier = testAwsVpclatticeAuthPolicy.ResourceIdentifier,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.vpclattice.VpclatticeFunctions;
    import com.pulumi.aws.vpclattice.inputs.GetAuthPolicyArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var test = VpclatticeFunctions.getAuthPolicy(GetAuthPolicyArgs.builder()
                .resourceIdentifier(testAwsVpclatticeAuthPolicy.resourceIdentifier())
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: aws:vpclattice:getAuthPolicy
          Arguments:
            resourceIdentifier: ${testAwsVpclatticeAuthPolicy.resourceIdentifier}
    

    Using getAuthPolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getAuthPolicy(args: GetAuthPolicyArgs, opts?: InvokeOptions): Promise<GetAuthPolicyResult>
    function getAuthPolicyOutput(args: GetAuthPolicyOutputArgs, opts?: InvokeOptions): Output<GetAuthPolicyResult>
    def get_auth_policy(policy: Optional[str] = None,
                        resource_identifier: Optional[str] = None,
                        state: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetAuthPolicyResult
    def get_auth_policy_output(policy: Optional[pulumi.Input[str]] = None,
                        resource_identifier: Optional[pulumi.Input[str]] = None,
                        state: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetAuthPolicyResult]
    func LookupAuthPolicy(ctx *Context, args *LookupAuthPolicyArgs, opts ...InvokeOption) (*LookupAuthPolicyResult, error)
    func LookupAuthPolicyOutput(ctx *Context, args *LookupAuthPolicyOutputArgs, opts ...InvokeOption) LookupAuthPolicyResultOutput

    > Note: This function is named LookupAuthPolicy in the Go SDK.

    public static class GetAuthPolicy 
    {
        public static Task<GetAuthPolicyResult> InvokeAsync(GetAuthPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetAuthPolicyResult> Invoke(GetAuthPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAuthPolicyResult> getAuthPolicy(GetAuthPolicyArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:vpclattice/getAuthPolicy:getAuthPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ResourceIdentifier string
    The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
    Policy string
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    State string
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
    ResourceIdentifier string
    The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
    Policy string
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    State string
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
    resourceIdentifier String
    The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
    policy String
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    state String
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
    resourceIdentifier string
    The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
    policy string
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    state string
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
    resource_identifier str
    The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
    policy str
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    state str
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
    resourceIdentifier String
    The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.
    policy String
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    state String
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.

    getAuthPolicy Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceIdentifier string
    Policy string
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    State string
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceIdentifier string
    Policy string
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    State string
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
    id String
    The provider-assigned unique ID for this managed resource.
    resourceIdentifier String
    policy String
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    state String
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
    id string
    The provider-assigned unique ID for this managed resource.
    resourceIdentifier string
    policy string
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    state string
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
    id str
    The provider-assigned unique ID for this managed resource.
    resource_identifier str
    policy str
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    state str
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.
    id String
    The provider-assigned unique ID for this managed resource.
    resourceIdentifier String
    policy String
    The auth policy. The policy string in JSON must not contain newlines or blank lines.
    state String
    The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client's IAM policy. If the Auth type is NONE, then, any auth policy you provide will remain inactive.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.31.1 published on Thursday, Apr 18, 2024 by Pulumi