alicloud.oss.AccessPoint
Explore with Pulumi AI
Provides a OSS Access Point resource.
You can create multiple Access points for buckets and configure different Access control permissions and network control policies for different Access points.
For information about OSS Access Point and how to use it, see What is Access Point.
NOTE: Available since v1.240.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const createBucket = new alicloud.oss.Bucket("CreateBucket", {storageClass: "Standard"});
const _default = new alicloud.oss.AccessPoint("default", {
accessPointName: name,
bucket: createBucket.bucket,
vpcConfiguration: {
vpcId: "vpc-abcexample",
},
networkOrigin: "vpc",
publicAccessBlockConfiguration: {
blockPublicAccess: true,
},
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
create_bucket = alicloud.oss.Bucket("CreateBucket", storage_class="Standard")
default = alicloud.oss.AccessPoint("default",
access_point_name=name,
bucket=create_bucket.bucket,
vpc_configuration={
"vpc_id": "vpc-abcexample",
},
network_origin="vpc",
public_access_block_configuration={
"block_public_access": True,
})
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/oss"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
createBucket, err := oss.NewBucket(ctx, "CreateBucket", &oss.BucketArgs{
StorageClass: pulumi.String("Standard"),
})
if err != nil {
return err
}
_, err = oss.NewAccessPoint(ctx, "default", &oss.AccessPointArgs{
AccessPointName: pulumi.String(name),
Bucket: createBucket.Bucket,
VpcConfiguration: &oss.AccessPointVpcConfigurationArgs{
VpcId: pulumi.String("vpc-abcexample"),
},
NetworkOrigin: pulumi.String("vpc"),
PublicAccessBlockConfiguration: &oss.AccessPointPublicAccessBlockConfigurationArgs{
BlockPublicAccess: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var createBucket = new AliCloud.Oss.Bucket("CreateBucket", new()
{
StorageClass = "Standard",
});
var @default = new AliCloud.Oss.AccessPoint("default", new()
{
AccessPointName = name,
Bucket = createBucket.BucketName,
VpcConfiguration = new AliCloud.Oss.Inputs.AccessPointVpcConfigurationArgs
{
VpcId = "vpc-abcexample",
},
NetworkOrigin = "vpc",
PublicAccessBlockConfiguration = new AliCloud.Oss.Inputs.AccessPointPublicAccessBlockConfigurationArgs
{
BlockPublicAccess = true,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.oss.Bucket;
import com.pulumi.alicloud.oss.BucketArgs;
import com.pulumi.alicloud.oss.AccessPoint;
import com.pulumi.alicloud.oss.AccessPointArgs;
import com.pulumi.alicloud.oss.inputs.AccessPointVpcConfigurationArgs;
import com.pulumi.alicloud.oss.inputs.AccessPointPublicAccessBlockConfigurationArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("terraform-example");
var createBucket = new Bucket("createBucket", BucketArgs.builder()
.storageClass("Standard")
.build());
var default_ = new AccessPoint("default", AccessPointArgs.builder()
.accessPointName(name)
.bucket(createBucket.bucket())
.vpcConfiguration(AccessPointVpcConfigurationArgs.builder()
.vpcId("vpc-abcexample")
.build())
.networkOrigin("vpc")
.publicAccessBlockConfiguration(AccessPointPublicAccessBlockConfigurationArgs.builder()
.blockPublicAccess(true)
.build())
.build());
}
}
configuration:
name:
type: string
default: terraform-example
resources:
createBucket:
type: alicloud:oss:Bucket
name: CreateBucket
properties:
storageClass: Standard
default:
type: alicloud:oss:AccessPoint
properties:
accessPointName: ${name}
bucket: ${createBucket.bucket}
vpcConfiguration:
vpcId: vpc-abcexample
networkOrigin: vpc
publicAccessBlockConfiguration:
blockPublicAccess: true
Create AccessPoint Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new AccessPoint(name: string, args: AccessPointArgs, opts?: CustomResourceOptions);
@overload
def AccessPoint(resource_name: str,
args: AccessPointArgs,
opts: Optional[ResourceOptions] = None)
@overload
def AccessPoint(resource_name: str,
opts: Optional[ResourceOptions] = None,
access_point_name: Optional[str] = None,
bucket: Optional[str] = None,
network_origin: Optional[str] = None,
public_access_block_configuration: Optional[AccessPointPublicAccessBlockConfigurationArgs] = None,
vpc_configuration: Optional[AccessPointVpcConfigurationArgs] = None)
func NewAccessPoint(ctx *Context, name string, args AccessPointArgs, opts ...ResourceOption) (*AccessPoint, error)
public AccessPoint(string name, AccessPointArgs args, CustomResourceOptions? opts = null)
public AccessPoint(String name, AccessPointArgs args)
public AccessPoint(String name, AccessPointArgs args, CustomResourceOptions options)
type: alicloud:oss:AccessPoint
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args AccessPointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args AccessPointArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args AccessPointArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AccessPointArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AccessPointArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var alicloudAccessPointResource = new AliCloud.Oss.AccessPoint("alicloudAccessPointResource", new()
{
AccessPointName = "string",
Bucket = "string",
NetworkOrigin = "string",
PublicAccessBlockConfiguration = new AliCloud.Oss.Inputs.AccessPointPublicAccessBlockConfigurationArgs
{
BlockPublicAccess = false,
},
VpcConfiguration = new AliCloud.Oss.Inputs.AccessPointVpcConfigurationArgs
{
VpcId = "string",
},
});
example, err := oss.NewAccessPoint(ctx, "alicloudAccessPointResource", &oss.AccessPointArgs{
AccessPointName: pulumi.String("string"),
Bucket: pulumi.String("string"),
NetworkOrigin: pulumi.String("string"),
PublicAccessBlockConfiguration: &oss.AccessPointPublicAccessBlockConfigurationArgs{
BlockPublicAccess: pulumi.Bool(false),
},
VpcConfiguration: &oss.AccessPointVpcConfigurationArgs{
VpcId: pulumi.String("string"),
},
})
var alicloudAccessPointResource = new AccessPoint("alicloudAccessPointResource", AccessPointArgs.builder()
.accessPointName("string")
.bucket("string")
.networkOrigin("string")
.publicAccessBlockConfiguration(AccessPointPublicAccessBlockConfigurationArgs.builder()
.blockPublicAccess(false)
.build())
.vpcConfiguration(AccessPointVpcConfigurationArgs.builder()
.vpcId("string")
.build())
.build());
alicloud_access_point_resource = alicloud.oss.AccessPoint("alicloudAccessPointResource",
access_point_name="string",
bucket="string",
network_origin="string",
public_access_block_configuration={
"block_public_access": False,
},
vpc_configuration={
"vpc_id": "string",
})
const alicloudAccessPointResource = new alicloud.oss.AccessPoint("alicloudAccessPointResource", {
accessPointName: "string",
bucket: "string",
networkOrigin: "string",
publicAccessBlockConfiguration: {
blockPublicAccess: false,
},
vpcConfiguration: {
vpcId: "string",
},
});
type: alicloud:oss:AccessPoint
properties:
accessPointName: string
bucket: string
networkOrigin: string
publicAccessBlockConfiguration:
blockPublicAccess: false
vpcConfiguration:
vpcId: string
AccessPoint Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The AccessPoint resource accepts the following input properties:
- Access
Point stringName - The name of the access point
- Bucket string
- The Bucket to which the current access point belongs.
- Network
Origin string - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- Public
Access Pulumi.Block Configuration Ali Cloud. Oss. Inputs. Access Point Public Access Block Configuration - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - Vpc
Configuration Pulumi.Ali Cloud. Oss. Inputs. Access Point Vpc Configuration - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
- Access
Point stringName - The name of the access point
- Bucket string
- The Bucket to which the current access point belongs.
- Network
Origin string - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- Public
Access AccessBlock Configuration Point Public Access Block Configuration Args - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - Vpc
Configuration AccessPoint Vpc Configuration Args - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
- access
Point StringName - The name of the access point
- bucket String
- The Bucket to which the current access point belongs.
- network
Origin String - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- public
Access AccessBlock Configuration Point Public Access Block Configuration - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - vpc
Configuration AccessPoint Vpc Configuration - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
- access
Point stringName - The name of the access point
- bucket string
- The Bucket to which the current access point belongs.
- network
Origin string - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- public
Access AccessBlock Configuration Point Public Access Block Configuration - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - vpc
Configuration AccessPoint Vpc Configuration - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
- access_
point_ strname - The name of the access point
- bucket str
- The Bucket to which the current access point belongs.
- network_
origin str - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- public_
access_ Accessblock_ configuration Point Public Access Block Configuration Args - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - vpc_
configuration AccessPoint Vpc Configuration Args - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
- access
Point StringName - The name of the access point
- bucket String
- The Bucket to which the current access point belongs.
- network
Origin String - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- public
Access Property MapBlock Configuration - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - vpc
Configuration Property Map - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
Outputs
All input properties are implicitly available as output properties. Additionally, the AccessPoint resource produces the following output properties:
Look up Existing AccessPoint Resource
Get an existing AccessPoint resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: AccessPointState, opts?: CustomResourceOptions): AccessPoint
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_point_name: Optional[str] = None,
bucket: Optional[str] = None,
network_origin: Optional[str] = None,
public_access_block_configuration: Optional[AccessPointPublicAccessBlockConfigurationArgs] = None,
status: Optional[str] = None,
vpc_configuration: Optional[AccessPointVpcConfigurationArgs] = None) -> AccessPoint
func GetAccessPoint(ctx *Context, name string, id IDInput, state *AccessPointState, opts ...ResourceOption) (*AccessPoint, error)
public static AccessPoint Get(string name, Input<string> id, AccessPointState? state, CustomResourceOptions? opts = null)
public static AccessPoint get(String name, Output<String> id, AccessPointState state, CustomResourceOptions options)
resources: _: type: alicloud:oss:AccessPoint get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Access
Point stringName - The name of the access point
- Bucket string
- The Bucket to which the current access point belongs.
- Network
Origin string - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- Public
Access Pulumi.Block Configuration Ali Cloud. Oss. Inputs. Access Point Public Access Block Configuration - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - Status string
- The status of the resource
- Vpc
Configuration Pulumi.Ali Cloud. Oss. Inputs. Access Point Vpc Configuration - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
- Access
Point stringName - The name of the access point
- Bucket string
- The Bucket to which the current access point belongs.
- Network
Origin string - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- Public
Access AccessBlock Configuration Point Public Access Block Configuration Args - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - Status string
- The status of the resource
- Vpc
Configuration AccessPoint Vpc Configuration Args - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
- access
Point StringName - The name of the access point
- bucket String
- The Bucket to which the current access point belongs.
- network
Origin String - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- public
Access AccessBlock Configuration Point Public Access Block Configuration - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - status String
- The status of the resource
- vpc
Configuration AccessPoint Vpc Configuration - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
- access
Point stringName - The name of the access point
- bucket string
- The Bucket to which the current access point belongs.
- network
Origin string - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- public
Access AccessBlock Configuration Point Public Access Block Configuration - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - status string
- The status of the resource
- vpc
Configuration AccessPoint Vpc Configuration - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
- access_
point_ strname - The name of the access point
- bucket str
- The Bucket to which the current access point belongs.
- network_
origin str - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- public_
access_ Accessblock_ configuration Point Public Access Block Configuration Args - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - status str
- The status of the resource
- vpc_
configuration AccessPoint Vpc Configuration Args - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
- access
Point StringName - The name of the access point
- bucket String
- The Bucket to which the current access point belongs.
- network
Origin String - Access point network source. The valid values are as follows:
- vpc: only the specified VPC ID can be used to access the access point.
- internet: the access point can be accessed through both external and internal Endpoint.
- public
Access Property MapBlock Configuration - Configuration of Access Point Blocking Public Access See
public_access_block_configuration
below. - status String
- The status of the resource
- vpc
Configuration Property Map - If the Network Origin is vpc, the VPC source information is saved here. See
vpc_configuration
below.
Supporting Types
AccessPointPublicAccessBlockConfiguration, AccessPointPublicAccessBlockConfigurationArgs
- Block
Public boolAccess - Block public access enabled for access point
- Block
Public boolAccess - Block public access enabled for access point
- block
Public BooleanAccess - Block public access enabled for access point
- block
Public booleanAccess - Block public access enabled for access point
- block_
public_ boolaccess - Block public access enabled for access point
- block
Public BooleanAccess - Block public access enabled for access point
AccessPointVpcConfiguration, AccessPointVpcConfigurationArgs
- Vpc
Id string - The vpc ID is required only when the value of NetworkOrigin is VPC.
- Vpc
Id string - The vpc ID is required only when the value of NetworkOrigin is VPC.
- vpc
Id String - The vpc ID is required only when the value of NetworkOrigin is VPC.
- vpc
Id string - The vpc ID is required only when the value of NetworkOrigin is VPC.
- vpc_
id str - The vpc ID is required only when the value of NetworkOrigin is VPC.
- vpc
Id String - The vpc ID is required only when the value of NetworkOrigin is VPC.
Import
OSS Access Point can be imported using the id, e.g.
$ pulumi import alicloud:oss/accessPoint:AccessPoint example <bucket>:<access_point_name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.