Skip to content

Updates an existing Amazon Lightsail bucket

Description

Updates an existing Amazon Lightsail bucket.

Use this action to update the configuration of an existing bucket, such as versioning, public accessibility, and the Amazon Web Services accounts that can access the bucket.

Usage

lightsail_update_bucket(bucketName, accessRules, versioning,
  readonlyAccessAccounts, accessLogConfig, cors)

Arguments

  • bucketName

    [required] The name of the bucket to update.

  • accessRules

    An object that sets the public accessibility of objects in the specified bucket.

  • versioning

    Specifies whether to enable or suspend versioning of objects in the bucket.

    The following options can be specified:

    • Enabled - Enables versioning of objects in the specified bucket.
    • Suspended - Suspends versioning of objects in the specified bucket. Existing object versions are retained.
  • readonlyAccessAccounts

    An array of strings to specify the Amazon Web Services account IDs that can access the bucket.

    You can give a maximum of 10 Amazon Web Services accounts access to a bucket.

  • accessLogConfig

    An object that describes the access log configuration for the bucket.

  • cors

    Sets the cross-origin resource sharing (CORS) configuration for your bucket. If a CORS configuration exists, it is replaced with the specified configuration. For AWS CLI operations, this parameter can also be passed as a file. For more information, see Configuring cross-origin resource sharing (CORS).

    CORS information is only returned in a response when you update the CORS policy.

Value

A list with the following syntax:

list(
  bucket = list(
    resourceType = "string",
    accessRules = list(
      getObject = "public"|"private",
      allowPublicOverrides = TRUE|FALSE
    ),
    arn = "string",
    bundleId = "string",
    createdAt = as.POSIXct(
      "2015-01-01"
    ),
    url = "string",
    location = list(
      availabilityZone = "string",
      regionName = "us-east-1"|"us-east-2"|"us-west-1"|"us-west-2"|"eu-west-1"|"eu-west-2"|"eu-west-3"|"eu-central-1"|"eu-north-1"|"eu-south-2"|"ca-central-1"|"ap-east-1"|"ap-south-1"|"ap-southeast-1"|"ap-southeast-2"|"ap-northeast-1"|"ap-northeast-2"|"ap-southeast-3"|"ap-southeast-5"|"sa-east-1"
    ),
    name = "string",
    supportCode = "string",
    tags = list(
      list(
        key = "string",
        value = "string"
      )
    ),
    objectVersioning = "string",
    ableToUpdateBundle = TRUE|FALSE,
    readonlyAccessAccounts = list(
      "string"
    ),
    resourcesReceivingAccess = list(
      list(
        name = "string",
        resourceType = "string"
      )
    ),
    state = list(
      code = "string",
      message = "string"
    ),
    accessLogConfig = list(
      enabled = TRUE|FALSE,
      destination = "string",
      prefix = "string"
    ),
    cors = list(
      rules = list(
        list(
          id = "string",
          allowedMethods = list(
            "string"
          ),
          allowedOrigins = list(
            "string"
          ),
          allowedHeaders = list(
            "string"
          ),
          exposeHeaders = list(
            "string"
          ),
          maxAgeSeconds = 123
        )
      )
    )
  ),
  operations = list(
    list(
      id = "string",
      resourceName = "string",
      resourceType = "ContainerService"|"Instance"|"StaticIp"|"KeyPair"|"InstanceSnapshot"|"Domain"|"PeeredVpc"|"LoadBalancer"|"LoadBalancerTlsCertificate"|"Disk"|"DiskSnapshot"|"RelationalDatabase"|"RelationalDatabaseSnapshot"|"ExportSnapshotRecord"|"CloudFormationStackRecord"|"Alarm"|"ContactMethod"|"Distribution"|"Certificate"|"Bucket",
      createdAt = as.POSIXct(
        "2015-01-01"
      ),
      location = list(
        availabilityZone = "string",
        regionName = "us-east-1"|"us-east-2"|"us-west-1"|"us-west-2"|"eu-west-1"|"eu-west-2"|"eu-west-3"|"eu-central-1"|"eu-north-1"|"eu-south-2"|"ca-central-1"|"ap-east-1"|"ap-south-1"|"ap-southeast-1"|"ap-southeast-2"|"ap-northeast-1"|"ap-northeast-2"|"ap-southeast-3"|"ap-southeast-5"|"sa-east-1"
      ),
      isTerminal = TRUE|FALSE,
      operationDetails = "string",
      operationType = "DeleteKnownHostKeys"|"DeleteInstance"|"CreateInstance"|"StopInstance"|"StartInstance"|"RebootInstance"|"OpenInstancePublicPorts"|"PutInstancePublicPorts"|"CloseInstancePublicPorts"|"AllocateStaticIp"|"ReleaseStaticIp"|"AttachStaticIp"|"DetachStaticIp"|"UpdateDomainEntry"|"DeleteDomainEntry"|"CreateDomain"|"DeleteDomain"|"CreateInstanceSnapshot"|"DeleteInstanceSnapshot"|"CreateInstancesFromSnapshot"|"CreateLoadBalancer"|"DeleteLoadBalancer"|"AttachInstancesToLoadBalancer"|"DetachInstancesFromLoadBalancer"|"UpdateLoadBalancerAttribute"|"CreateLoadBalancerTlsCertificate"|"DeleteLoadBalancerTlsCertificate"|"AttachLoadBalancerTlsCertificate"|"CreateDisk"|"DeleteDisk"|"AttachDisk"|"DetachDisk"|"CreateDiskSnapshot"|"DeleteDiskSnapshot"|"CreateDiskFromSnapshot"|"CreateRelationalDatabase"|"UpdateRelationalDatabase"|"DeleteRelationalDatabase"|"CreateRelationalDatabaseFromSnapshot"|"CreateRelationalDatabaseSnapshot"|"DeleteRelationalDatabaseSnapshot"|"UpdateRelationalDatabaseParameters"|"StartRelationalDatabase"|"RebootRelationalDatabase"|"StopRelationalDatabase"|"EnableAddOn"|"DisableAddOn"|"PutAlarm"|"GetAlarms"|"DeleteAlarm"|"TestAlarm"|"CreateContactMethod"|"GetContactMethods"|"SendContactMethodVerification"|"DeleteContactMethod"|"CreateDistribution"|"UpdateDistribution"|"DeleteDistribution"|"ResetDistributionCache"|"AttachCertificateToDistribution"|"DetachCertificateFromDistribution"|"UpdateDistributionBundle"|"SetIpAddressType"|"CreateCertificate"|"DeleteCertificate"|"CreateContainerService"|"UpdateContainerService"|"DeleteContainerService"|"CreateContainerServiceDeployment"|"CreateContainerServiceRegistryLogin"|"RegisterContainerImage"|"DeleteContainerImage"|"CreateBucket"|"DeleteBucket"|"CreateBucketAccessKey"|"DeleteBucketAccessKey"|"UpdateBucketBundle"|"UpdateBucket"|"SetResourceAccessForBucket"|"UpdateInstanceMetadataOptions"|"StartGUISession"|"StopGUISession"|"SetupInstanceHttps"|"GetProfile",
      status = "NotStarted"|"Started"|"Failed"|"Completed"|"Succeeded",
      statusChangedAt = as.POSIXct(
        "2015-01-01"
      ),
      errorCode = "string",
      errorDetails = "string"
    )
  )
)

Request syntax

svc$update_bucket(
  bucketName = "string",
  accessRules = list(
    getObject = "public"|"private",
    allowPublicOverrides = TRUE|FALSE
  ),
  versioning = "string",
  readonlyAccessAccounts = list(
    "string"
  ),
  accessLogConfig = list(
    enabled = TRUE|FALSE,
    destination = "string",
    prefix = "string"
  ),
  cors = list(
    rules = list(
      list(
        id = "string",
        allowedMethods = list(
          "string"
        ),
        allowedOrigins = list(
          "string"
        ),
        allowedHeaders = list(
          "string"
        ),
        exposeHeaders = list(
          "string"
        ),
        maxAgeSeconds = 123
      )
    )
  )
)