Class AwsServiceAccess


  • public class AwsServiceAccess
    extends com.pulumi.resources.CustomResource
    Manages trusted access between an AWS service and AWS Organizations. > **Note:** AWS recommends enabling and disabling trusted access for a service through the service's own console or its AWS CLI commands or API operation equivalents, rather than using this resource directly. Using the service-specific tooling ensures that the service can perform the required steps when enabling trusted access (e.g. creating any required resources) and any required clean up operations when disabling trusted access. See the [AWS Organizations User Guide](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services.html) for more details. The complete list of AWS services that support trusted access with AWS Organizations is available in the [Services that work with Organizations](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_integrate_services_list.html) page. > **Note:** This resource requires the Organizations management account. > **NOTE:** Terraform provides both this standalone AWS service access resource and exclusive service access defined in-line in the `aws.organizations.Organization` resource via the `awsServiceAccessPrincipals` argument. At this time, you cannot use the service access in conjunction with this resource otherwise it will cause a perpetual difference in plan output. You can optionally use the generic Terraform resource lifecycle configuration block with `ignoreChanges` in the `aws.organizations.Organization` resource to manage additional service access via this resource. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.organizations.AwsServiceAccess;
     import com.pulumi.aws.organizations.AwsServiceAccessArgs;
     import java.util.ArrayList;
     import java.util.Arrays;
     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) {
             var example = new AwsServiceAccess("example", AwsServiceAccessArgs.builder()
                 .servicePrincipal("tagpolicies.tag.amazonaws.com")
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required * `servicePrincipal` (String) Service principal name of the AWS service for which you want to enable integration. #### Optional * `accountId` (String) AWS Account where this resource is managed. Using `pulumi import`, import trusted access using the `servicePrincipal`. For example: ```sh $ pulumi import aws:organizations/awsServiceAccess:AwsServiceAccess example tagpolicies.tag.amazonaws.com ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.lang.String> dateEnabled()  
      static AwsServiceAccess get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, AwsServiceAccessState state, com.pulumi.resources.CustomResourceOptions options)
      Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
      com.pulumi.core.Output<java.lang.String> servicePrincipal()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AwsServiceAccess

        public AwsServiceAccess​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • AwsServiceAccess

        public AwsServiceAccess​(java.lang.String name,
                                AwsServiceAccessArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • AwsServiceAccess

        public AwsServiceAccess​(java.lang.String name,
                                AwsServiceAccessArgs args,
                                @Nullable
                                com.pulumi.resources.CustomResourceOptions options)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
        options - A bag of options that control this resource's behavior.
    • Method Detail

      • dateEnabled

        public com.pulumi.core.Output<java.lang.String> dateEnabled()
        Returns:
        Date and time that the service was enabled, in RFC 3339 format.
      • servicePrincipal

        public com.pulumi.core.Output<java.lang.String> servicePrincipal()
        Returns:
        Service principal of the AWS service to enable. For example, `tagpolicies.tag.amazonaws.com`. Changing this value will force a new resource.
      • get

        public static AwsServiceAccess get​(java.lang.String name,
                                           com.pulumi.core.Output<java.lang.String> id,
                                           @Nullable
                                           AwsServiceAccessState state,
                                           @Nullable
                                           com.pulumi.resources.CustomResourceOptions options)
        Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
        Parameters:
        name - The _unique_ name of the resulting resource.
        id - The _unique_ provider ID of the resource to lookup.
        state -
        options - Optional settings to control the behavior of the CustomResource.