NAME

Azure::SDK::AppConfiguration - Azure App Configuration data-plane client

SYNOPSIS

my $client = Azure::SDK::AppConfiguration->new(
    connection_string => $ENV{CONFIGURATION_CONNECTIONSTRING},
);
my $setting = $client->set_configuration_setting('app:message', 'hello');

DESCRIPTION

Provides bounded configuration-setting CRUD and lazy listing through the shared Core pipeline. Aspire's loopback emulator uses anonymous access; Azure HTTPS requests are HMAC-signed on every retry. Synchronization tokens returned by the service are retained and sent on later requests from the same client to provide read-after-write consistency.

CONSTRUCTOR

new

my $client = Azure::SDK::AppConfiguration->new(
        connection_string => $connection_string,
        options           => $client_options,
);

connection_string is required and may be connection-string text or an Azure::SDK::AppConfiguration::ConnectionString. Optional options must be an Azure::SDK::Core::ClientOptions.

SETTING METHODS

set_configuration_setting

my $setting = $client->set_configuration_setting($key, $value, %options);

Creates or replaces a setting and returns an Azure::SDK::AppConfiguration::ConfigurationSetting. Options are label, content_type, tags, if_match, and if_none_match. The two condition options are mutually exclusive.

get_configuration_setting

my $setting = $client->get_configuration_setting($key, %options);

Gets and returns one Azure::SDK::AppConfiguration::ConfigurationSetting. Options are label, if_none_match, and if_exists. Returns undef for HTTP 304, and also for HTTP 404 when if_exists is true.

delete_configuration_setting

my $setting = $client->delete_configuration_setting($key, %options);

Deletes one setting. Options are label, if_match, and if_exists. if_exists makes HTTP 404 return undef. A successful response with a body returns the deleted Azure::SDK::AppConfiguration::ConfigurationSetting; an empty successful response returns undef.

list_configuration_settings

my $page = $client->list_configuration_settings(%options);

Returns one Azure::SDK::AppConfiguration::ConfigurationSettingPage. Accepts key_filter, label_filter, or an opaque continuation_token. A continuation token cannot be combined with filters.

list_configuration_settings_pager

my $pager = $client->list_configuration_settings_pager(%options);

Returns a lazy Azure::SDK::Core::Pager over configuration settings. Accepts the same options as list_configuration_settings. No request is sent until a page or item is consumed.

list_all_configuration_settings

my $settings = $client->list_all_configuration_settings(%options);

Consumes the settings pager and returns an array reference containing every Azure::SDK::AppConfiguration::ConfigurationSetting. Accepts the same options as list_configuration_settings.

LABEL METHODS

list_labels

my $page = $client->list_labels(%options);

Returns one Azure::SDK::AppConfiguration::ConfigurationLabelPage. Accepts a name_filter or an opaque continuation_token, but not both.

list_labels_pager

my $pager = $client->list_labels_pager(%options);

Returns a lazy Azure::SDK::Core::Pager over labels. Accepts the same options as list_labels.

list_all_labels

my $labels = $client->list_all_labels(%options);

Consumes the label pager and returns an array reference containing every Azure::SDK::AppConfiguration::ConfigurationLabel. Accepts the same options as list_labels.

SNAPSHOT METHODS

create_snapshot

my $operation = $client->create_snapshot(
        $name,
        filters           => [{ key => 'app/*', label => 'production' }],
        composition_type  => 'key_label',
        retention_period  => 86_400,
        tags              => { release => '2026-08' },
);

Starts snapshot creation and returns an Azure::SDK::AppConfiguration::CreateSnapshotOperation. filters is required and contains one to three Azure::SDK::AppConfiguration::SnapshotFilter objects or equivalent hash references. composition_type is key by default or key_label. retention_period is measured in seconds.

get_snapshot

my $snapshot = $client->get_snapshot($name, %options);

Gets and returns one Azure::SDK::AppConfiguration::ConfigurationSnapshot. Options are if_none_match and if_exists. Returns undef for HTTP 304, and also for HTTP 404 when if_exists is true.

archive_snapshot

my $snapshot = $client->archive_snapshot($name, %options);

Archives a snapshot and returns its updated Azure::SDK::AppConfiguration::ConfigurationSnapshot. Accepts if_match or if_none_match.

recover_snapshot

my $snapshot = $client->recover_snapshot($name, %options);

Recovers an archived snapshot and returns its updated Azure::SDK::AppConfiguration::ConfigurationSnapshot. Accepts if_match or if_none_match.

list_snapshots

my $page = $client->list_snapshots(%options);

Returns one Azure::SDK::AppConfiguration::ConfigurationSnapshotPage. Accepts name_filter, status, or an opaque continuation_token. status may be one status or an array reference containing one to five provisioning, ready, archived, or failed values.

list_snapshots_pager

my $pager = $client->list_snapshots_pager(%options);

Returns a lazy Azure::SDK::Core::Pager over snapshots. Accepts the same options as list_snapshots.

list_all_snapshots

my $snapshots = $client->list_all_snapshots(%options);

Consumes the snapshot pager and returns an array reference containing every Azure::SDK::AppConfiguration::ConfigurationSnapshot. Accepts the same options as list_snapshots.

list_snapshot_settings

my $page = $client->list_snapshot_settings($name, %options);

Returns one Azure::SDK::AppConfiguration::ConfigurationSettingPage containing key-values captured by the named snapshot. Accepts an opaque continuation_token.

list_snapshot_settings_pager

my $pager = $client->list_snapshot_settings_pager($name, %options);

Returns a lazy Azure::SDK::Core::Pager over settings captured by the named snapshot. Accepts an opaque continuation_token.

list_all_snapshot_settings

my $settings = $client->list_all_snapshot_settings($name, %options);

Consumes the snapshot-setting pager and returns all captured settings in an array reference. Accepts an opaque continuation_token.

ACCESSORS

connection

Returns the parsed Azure::SDK::AppConfiguration::ConnectionString.

uri

Returns the client's Azure::SDK::AppConfiguration::Uri builder.

serializer

Returns the client's Azure::SDK::AppConfiguration::Serializer.

core

Returns the configured Azure::SDK::Core client.

FILTERING SETTINGS WITHOUT LABELS

Pass the NUL sentinel "\0" as label_filter to select settings that have no label. The client encodes the sentinel as the App Configuration REST filter label=%00.

my $page = $client->list_configuration_settings(
        label_filter => "\0",
);

ERRORS

Invalid arguments throw plain Perl exceptions. Non-success service responses throw Azure::SDK::Core::Error.

SEE ALSO

Azure::SDK::Core::ClientOptions, Azure::SDK::AppConfiguration::ConfigurationSetting, Azure::SDK::AppConfiguration::ConfigurationSnapshot