Google Cloud OsConfig V1 Client - Class AptRepository (1.2.2)

Reference documentation and code samples for the Google Cloud OsConfig V1 Client class AptRepository.

Represents a single apt package repository. These will be added to a repo file that will be managed at /etc/apt/sources.list.d/google_osconfig.list.

Generated from protobuf message google.cloud.osconfig.v1.OSPolicy.Resource.RepositoryResource.AptRepository

Namespace

Google \ Cloud \ OsConfig \ V1 \ OSPolicy \ Resource \ RepositoryResource

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ archive_type int

Required. Type of archive files in this repository.

↳ uri string

Required. URI for this repository.

↳ distribution string

Required. Distribution of this repository.

↳ components array

Required. List of components for this repository. Must contain at least one item.

↳ gpg_key string

URI of the key file for this repository. The agent maintains a keyring at /etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg.

getArchiveType

Required. Type of archive files in this repository.

Returns
TypeDescription
int

setArchiveType

Required. Type of archive files in this repository.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getUri

Required. URI for this repository.

Returns
TypeDescription
string

setUri

Required. URI for this repository.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getDistribution

Required. Distribution of this repository.

Returns
TypeDescription
string

setDistribution

Required. Distribution of this repository.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getComponents

Required. List of components for this repository. Must contain at least one item.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setComponents

Required. List of components for this repository. Must contain at least one item.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getGpgKey

URI of the key file for this repository. The agent maintains a keyring at /etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg.

Returns
TypeDescription
string

setGpgKey

URI of the key file for this repository. The agent maintains a keyring at /etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg.

Parameter
NameDescription
var string
Returns
TypeDescription
$this