Class FileSystemPolicy
Provides an Elastic File System (EFS) File System Policy resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var fs = new Aws.Efs.FileSystem("fs", new Aws.Efs.FileSystemArgs
{
});
var policy = new Aws.Efs.FileSystemPolicy("policy", new Aws.Efs.FileSystemPolicyArgs
{
FileSystemId = fs.Id,
Policy = @$"{{
""Version"": ""2012-10-17"",
""Id"": ""ExamplePolicy01"",
""Statement"": [
{{
""Sid"": ""ExampleSatement01"",
""Effect"": ""Allow"",
""Principal"": {{
""AWS"": ""*""
}},
""Resource"": ""{aws_efs_file_system.Test.Arn}"",
""Action"": [
""elasticfilesystem:ClientMount"",
""elasticfilesystem:ClientWrite""
],
""Condition"": {{
""Bool"": {{
""aws:SecureTransport"": ""true""
}}
}}
}}
]
}}
",
});
}
}
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.Efs
Assembly: Pulumi.Aws.dll
Syntax
public class FileSystemPolicy : CustomResource
Constructors
View SourceFileSystemPolicy(String, FileSystemPolicyArgs, CustomResourceOptions)
Create a FileSystemPolicy resource with the given unique name, arguments, and options.
Declaration
public FileSystemPolicy(string name, FileSystemPolicyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| FileSystemPolicyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceFileSystemId
The ID of the EFS file system.
Declaration
public Output<string> FileSystemId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Policy
The JSON formatted file system policy for the EFS file system. see Docs for more info.
Declaration
public Output<string> Policy { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, FileSystemPolicyState, CustomResourceOptions)
Get an existing FileSystemPolicy resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static FileSystemPolicy Get(string name, Input<string> id, FileSystemPolicyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| FileSystemPolicyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| FileSystemPolicy |