1. Packages
  2. Mongodbatlas Provider
  3. API Docs
  4. getResourcePolicy
MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi

mongodbatlas.getResourcePolicy

Explore with Pulumi AI

MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi

Example Usage

Using getResourcePolicy

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 getResourcePolicy(args: GetResourcePolicyArgs, opts?: InvokeOptions): Promise<GetResourcePolicyResult>
function getResourcePolicyOutput(args: GetResourcePolicyOutputArgs, opts?: InvokeOptions): Output<GetResourcePolicyResult>
Copy
def get_resource_policy(id: Optional[str] = None,
                        org_id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetResourcePolicyResult
def get_resource_policy_output(id: Optional[pulumi.Input[str]] = None,
                        org_id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetResourcePolicyResult]
Copy
func LookupResourcePolicy(ctx *Context, args *LookupResourcePolicyArgs, opts ...InvokeOption) (*LookupResourcePolicyResult, error)
func LookupResourcePolicyOutput(ctx *Context, args *LookupResourcePolicyOutputArgs, opts ...InvokeOption) LookupResourcePolicyResultOutput
Copy

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

public static class GetResourcePolicy 
{
    public static Task<GetResourcePolicyResult> InvokeAsync(GetResourcePolicyArgs args, InvokeOptions? opts = null)
    public static Output<GetResourcePolicyResult> Invoke(GetResourcePolicyInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetResourcePolicyResult> getResourcePolicy(GetResourcePolicyArgs args, InvokeOptions options)
public static Output<GetResourcePolicyResult> getResourcePolicy(GetResourcePolicyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: mongodbatlas:index/getResourcePolicy:getResourcePolicy
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Id This property is required. string
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
OrgId This property is required. string
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
Id This property is required. string
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
OrgId This property is required. string
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
id This property is required. String
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
orgId This property is required. String
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
id This property is required. string
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
orgId This property is required. string
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
id This property is required. str
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
org_id This property is required. str
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
id This property is required. String
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
orgId This property is required. String
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.

getResourcePolicy Result

The following output properties are available:

CreatedByUser GetResourcePolicyCreatedByUser
The user that last updated the Atlas resource policy.
CreatedDate string
Date and time in UTC when the Atlas resource policy was created.
Id string
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
LastUpdatedByUser GetResourcePolicyLastUpdatedByUser
The user that last updated the Atlas resource policy.
LastUpdatedDate string
Date and time in UTC when the Atlas resource policy was last updated.
Name string
Human-readable label that describes the Atlas resource policy.
OrgId string
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
Policies List<GetResourcePolicyPolicy>
List of policies that make up the Atlas resource policy.
Version string
A string that identifies the version of the Atlas resource policy.
CreatedByUser GetResourcePolicyCreatedByUser
The user that last updated the Atlas resource policy.
CreatedDate string
Date and time in UTC when the Atlas resource policy was created.
Id string
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
LastUpdatedByUser GetResourcePolicyLastUpdatedByUser
The user that last updated the Atlas resource policy.
LastUpdatedDate string
Date and time in UTC when the Atlas resource policy was last updated.
Name string
Human-readable label that describes the Atlas resource policy.
OrgId string
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
Policies []GetResourcePolicyPolicy
List of policies that make up the Atlas resource policy.
Version string
A string that identifies the version of the Atlas resource policy.
createdByUser GetResourcePolicyCreatedByUser
The user that last updated the Atlas resource policy.
createdDate String
Date and time in UTC when the Atlas resource policy was created.
id String
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
lastUpdatedByUser GetResourcePolicyLastUpdatedByUser
The user that last updated the Atlas resource policy.
lastUpdatedDate String
Date and time in UTC when the Atlas resource policy was last updated.
name String
Human-readable label that describes the Atlas resource policy.
orgId String
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
policies List<GetResourcePolicyPolicy>
List of policies that make up the Atlas resource policy.
version String
A string that identifies the version of the Atlas resource policy.
createdByUser GetResourcePolicyCreatedByUser
The user that last updated the Atlas resource policy.
createdDate string
Date and time in UTC when the Atlas resource policy was created.
id string
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
lastUpdatedByUser GetResourcePolicyLastUpdatedByUser
The user that last updated the Atlas resource policy.
lastUpdatedDate string
Date and time in UTC when the Atlas resource policy was last updated.
name string
Human-readable label that describes the Atlas resource policy.
orgId string
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
policies GetResourcePolicyPolicy[]
List of policies that make up the Atlas resource policy.
version string
A string that identifies the version of the Atlas resource policy.
created_by_user GetResourcePolicyCreatedByUser
The user that last updated the Atlas resource policy.
created_date str
Date and time in UTC when the Atlas resource policy was created.
id str
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
last_updated_by_user GetResourcePolicyLastUpdatedByUser
The user that last updated the Atlas resource policy.
last_updated_date str
Date and time in UTC when the Atlas resource policy was last updated.
name str
Human-readable label that describes the Atlas resource policy.
org_id str
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
policies Sequence[GetResourcePolicyPolicy]
List of policies that make up the Atlas resource policy.
version str
A string that identifies the version of the Atlas resource policy.
createdByUser Property Map
The user that last updated the Atlas resource policy.
createdDate String
Date and time in UTC when the Atlas resource policy was created.
id String
Unique 24-hexadecimal digit string that identifies an Atlas resource policy.
lastUpdatedByUser Property Map
The user that last updated the Atlas resource policy.
lastUpdatedDate String
Date and time in UTC when the Atlas resource policy was last updated.
name String
Human-readable label that describes the Atlas resource policy.
orgId String
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the /orgs endpoint to retrieve all organizations to which the authenticated user has access.
policies List<Property Map>
List of policies that make up the Atlas resource policy.
version String
A string that identifies the version of the Atlas resource policy.

Supporting Types

GetResourcePolicyCreatedByUser

Id This property is required. string
Unique 24-hexadecimal character string that identifies a user.
Name This property is required. string
Human-readable label that describes a user.
Id This property is required. string
Unique 24-hexadecimal character string that identifies a user.
Name This property is required. string
Human-readable label that describes a user.
id This property is required. String
Unique 24-hexadecimal character string that identifies a user.
name This property is required. String
Human-readable label that describes a user.
id This property is required. string
Unique 24-hexadecimal character string that identifies a user.
name This property is required. string
Human-readable label that describes a user.
id This property is required. str
Unique 24-hexadecimal character string that identifies a user.
name This property is required. str
Human-readable label that describes a user.
id This property is required. String
Unique 24-hexadecimal character string that identifies a user.
name This property is required. String
Human-readable label that describes a user.

GetResourcePolicyLastUpdatedByUser

Id This property is required. string
Unique 24-hexadecimal character string that identifies a user.
Name This property is required. string
Human-readable label that describes a user.
Id This property is required. string
Unique 24-hexadecimal character string that identifies a user.
Name This property is required. string
Human-readable label that describes a user.
id This property is required. String
Unique 24-hexadecimal character string that identifies a user.
name This property is required. String
Human-readable label that describes a user.
id This property is required. string
Unique 24-hexadecimal character string that identifies a user.
name This property is required. string
Human-readable label that describes a user.
id This property is required. str
Unique 24-hexadecimal character string that identifies a user.
name This property is required. str
Human-readable label that describes a user.
id This property is required. String
Unique 24-hexadecimal character string that identifies a user.
name This property is required. String
Human-readable label that describes a user.

GetResourcePolicyPolicy

Body This property is required. string
A string that defines the permissions for the policy. The syntax used is the Cedar Policy language.
Id This property is required. string
Unique 24-hexadecimal character string that identifies the policy.
Body This property is required. string
A string that defines the permissions for the policy. The syntax used is the Cedar Policy language.
Id This property is required. string
Unique 24-hexadecimal character string that identifies the policy.
body This property is required. String
A string that defines the permissions for the policy. The syntax used is the Cedar Policy language.
id This property is required. String
Unique 24-hexadecimal character string that identifies the policy.
body This property is required. string
A string that defines the permissions for the policy. The syntax used is the Cedar Policy language.
id This property is required. string
Unique 24-hexadecimal character string that identifies the policy.
body This property is required. str
A string that defines the permissions for the policy. The syntax used is the Cedar Policy language.
id This property is required. str
Unique 24-hexadecimal character string that identifies the policy.
body This property is required. String
A string that defines the permissions for the policy. The syntax used is the Cedar Policy language.
id This property is required. String
Unique 24-hexadecimal character string that identifies the policy.

Package Details

Repository
MongoDB Atlas pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes
This Pulumi package is based on the mongodbatlas Terraform Provider.
MongoDB Atlas v3.30.0 published on Friday, Mar 21, 2025 by Pulumi