Skip to content

Commit

Permalink
Get functions
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejressel committed Sep 28, 2024
1 parent a062ff5 commit 7ab4f97
Show file tree
Hide file tree
Showing 29 changed files with 261 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,18 @@ pub struct GetAccessApplicationResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetAccessApplicationArgs) -> GetAccessApplicationResult {
pub fn invoke(
args: GetAccessApplicationArgs
) -> GetAccessApplicationResult {

let result = crate::bindings::pulumi::cloudflare::get_access_application::invoke(&crate::bindings::pulumi::cloudflare::get_access_application::Args {
account_id: &args.account_id.get_inner(),
domain: &args.domain.get_inner(),
name: &args.name.get_inner(),
zone_id: &args.zone_id.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_access_application::invoke(
&crate::bindings::pulumi::cloudflare::get_access_application::Args {
account_id: &args.account_id.get_inner(),
domain: &args.domain.get_inner(),
name: &args.name.get_inner(),
zone_id: &args.zone_id.get_inner(),
}
);

GetAccessApplicationResult {
account_id: crate::into_domain(result.account_id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,17 @@ pub struct GetAccessIdentityProviderResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetAccessIdentityProviderArgs) -> GetAccessIdentityProviderResult {
pub fn invoke(
args: GetAccessIdentityProviderArgs
) -> GetAccessIdentityProviderResult {

let result = crate::bindings::pulumi::cloudflare::get_access_identity_provider::invoke(&crate::bindings::pulumi::cloudflare::get_access_identity_provider::Args {
account_id: &args.account_id.get_inner(),
name: &args.name.get_inner(),
zone_id: &args.zone_id.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_access_identity_provider::invoke(
&crate::bindings::pulumi::cloudflare::get_access_identity_provider::Args {
account_id: &args.account_id.get_inner(),
name: &args.name.get_inner(),
zone_id: &args.zone_id.get_inner(),
}
);

GetAccessIdentityProviderResult {
account_id: crate::into_domain(result.account_id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ pub struct GetAccountRolesResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetAccountRolesArgs) -> GetAccountRolesResult {
pub fn invoke(
args: GetAccountRolesArgs
) -> GetAccountRolesResult {

let result = crate::bindings::pulumi::cloudflare::get_account_roles::invoke(&crate::bindings::pulumi::cloudflare::get_account_roles::Args {
account_id: &args.account_id.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_account_roles::invoke(
&crate::bindings::pulumi::cloudflare::get_account_roles::Args {
account_id: &args.account_id.get_inner(),
}
);

GetAccountRolesResult {
account_id: crate::into_domain(result.account_id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,15 @@ pub struct GetAccountsResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetAccountsArgs) -> GetAccountsResult {
pub fn invoke(
args: GetAccountsArgs
) -> GetAccountsResult {

let result = crate::bindings::pulumi::cloudflare::get_accounts::invoke(&crate::bindings::pulumi::cloudflare::get_accounts::Args {
name: &args.name.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_accounts::invoke(
&crate::bindings::pulumi::cloudflare::get_accounts::Args {
name: &args.name.get_inner(),
}
);

GetAccountsResult {
accounts: crate::into_domain(result.accounts),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,6 @@
//! ```
//! <!--End PulumiCodeChooser -->
#[derive(bon::Builder)]
#[builder(finish_fn = build_struct)]
pub struct GetApiTokenPermissionGroupsArgs {
}

pub struct GetApiTokenPermissionGroupsResult {
/// Map of permissions for account level resources.
Expand All @@ -133,10 +129,11 @@ pub struct GetApiTokenPermissionGroupsResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetApiTokenPermissionGroupsArgs) -> GetApiTokenPermissionGroupsResult {
pub fn invoke(
) -> GetApiTokenPermissionGroupsResult {

let result = crate::bindings::pulumi::cloudflare::get_api_token_permission_groups::invoke(&crate::bindings::pulumi::cloudflare::get_api_token_permission_groups::Args {
});
let result = crate::bindings::pulumi::cloudflare::get_api_token_permission_groups::invoke(
);

GetApiTokenPermissionGroupsResult {
account: crate::into_domain(result.account),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,17 @@ pub struct GetDevicePostureRulesResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetDevicePostureRulesArgs) -> GetDevicePostureRulesResult {
pub fn invoke(
args: GetDevicePostureRulesArgs
) -> GetDevicePostureRulesResult {

let result = crate::bindings::pulumi::cloudflare::get_device_posture_rules::invoke(&crate::bindings::pulumi::cloudflare::get_device_posture_rules::Args {
account_id: &args.account_id.get_inner(),
name: &args.name.get_inner(),
type_: &args.type_.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_device_posture_rules::invoke(
&crate::bindings::pulumi::cloudflare::get_device_posture_rules::Args {
account_id: &args.account_id.get_inner(),
name: &args.name.get_inner(),
type_: &args.type_.get_inner(),
}
);

GetDevicePostureRulesResult {
account_id: crate::into_domain(result.account_id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,15 @@ pub struct GetDevicesResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetDevicesArgs) -> GetDevicesResult {
pub fn invoke(
args: GetDevicesArgs
) -> GetDevicesResult {

let result = crate::bindings::pulumi::cloudflare::get_devices::invoke(&crate::bindings::pulumi::cloudflare::get_devices::Args {
account_id: &args.account_id.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_devices::invoke(
&crate::bindings::pulumi::cloudflare::get_devices::Args {
account_id: &args.account_id.get_inner(),
}
);

GetDevicesResult {
account_id: crate::into_domain(result.account_id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,15 @@ pub struct GetDlpDatasetsResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetDlpDatasetsArgs) -> GetDlpDatasetsResult {
pub fn invoke(
args: GetDlpDatasetsArgs
) -> GetDlpDatasetsResult {

let result = crate::bindings::pulumi::cloudflare::get_dlp_datasets::invoke(&crate::bindings::pulumi::cloudflare::get_dlp_datasets::Args {
account_id: &args.account_id.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_dlp_datasets::invoke(
&crate::bindings::pulumi::cloudflare::get_dlp_datasets::Args {
account_id: &args.account_id.get_inner(),
}
);

GetDlpDatasetsResult {
account_id: crate::into_domain(result.account_id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@
//! ```
//! <!--End PulumiCodeChooser -->
#[derive(bon::Builder)]
#[builder(finish_fn = build_struct)]
pub struct GetIpRangesArgs {
}

pub struct GetIpRangesResult {
/// The lexically ordered list of only the IPv4 China CIDR blocks.
Expand All @@ -177,10 +173,11 @@ pub struct GetIpRangesResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetIpRangesArgs) -> GetIpRangesResult {
pub fn invoke(
) -> GetIpRangesResult {

let result = crate::bindings::pulumi::cloudflare::get_ip_ranges::invoke(&crate::bindings::pulumi::cloudflare::get_ip_ranges::Args {
});
let result = crate::bindings::pulumi::cloudflare::get_ip_ranges::invoke(
);

GetIpRangesResult {
china_ipv4_cidr_blocks: crate::into_domain(result.china_ipv4_cidr_blocks),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,16 @@ pub struct GetListResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetListArgs) -> GetListResult {
pub fn invoke(
args: GetListArgs
) -> GetListResult {

let result = crate::bindings::pulumi::cloudflare::get_list::invoke(&crate::bindings::pulumi::cloudflare::get_list::Args {
account_id: &args.account_id.get_inner(),
name: &args.name.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_list::invoke(
&crate::bindings::pulumi::cloudflare::get_list::Args {
account_id: &args.account_id.get_inner(),
name: &args.name.get_inner(),
}
);

GetListResult {
account_id: crate::into_domain(result.account_id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,15 @@ pub struct GetListsResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetListsArgs) -> GetListsResult {
pub fn invoke(
args: GetListsArgs
) -> GetListsResult {

let result = crate::bindings::pulumi::cloudflare::get_lists::invoke(&crate::bindings::pulumi::cloudflare::get_lists::Args {
account_id: &args.account_id.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_lists::invoke(
&crate::bindings::pulumi::cloudflare::get_lists::Args {
account_id: &args.account_id.get_inner(),
}
);

GetListsResult {
account_id: crate::into_domain(result.account_id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,17 @@ pub struct GetLoadBalancerPoolsResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetLoadBalancerPoolsArgs) -> GetLoadBalancerPoolsResult {
pub fn invoke(
args: GetLoadBalancerPoolsArgs
) -> GetLoadBalancerPoolsResult {

let result = crate::bindings::pulumi::cloudflare::get_load_balancer_pools::invoke(&crate::bindings::pulumi::cloudflare::get_load_balancer_pools::Args {
account_id: &args.account_id.get_inner(),
filter: &args.filter.get_inner(),
pools: &args.pools.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_load_balancer_pools::invoke(
&crate::bindings::pulumi::cloudflare::get_load_balancer_pools::Args {
account_id: &args.account_id.get_inner(),
filter: &args.filter.get_inner(),
pools: &args.pools.get_inner(),
}
);

GetLoadBalancerPoolsResult {
account_id: crate::into_domain(result.account_id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,15 @@ pub struct GetOriginCaCertificateResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetOriginCaCertificateArgs) -> GetOriginCaCertificateResult {
pub fn invoke(
args: GetOriginCaCertificateArgs
) -> GetOriginCaCertificateResult {

let result = crate::bindings::pulumi::cloudflare::get_origin_ca_certificate::invoke(&crate::bindings::pulumi::cloudflare::get_origin_ca_certificate::Args {
id: &args.id.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_origin_ca_certificate::invoke(
&crate::bindings::pulumi::cloudflare::get_origin_ca_certificate::Args {
id: &args.id.get_inner(),
}
);

GetOriginCaCertificateResult {
certificate: crate::into_domain(result.certificate),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,15 @@ pub struct GetOriginCaRootCertificateResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetOriginCaRootCertificateArgs) -> GetOriginCaRootCertificateResult {
pub fn invoke(
args: GetOriginCaRootCertificateArgs
) -> GetOriginCaRootCertificateResult {

let result = crate::bindings::pulumi::cloudflare::get_origin_ca_root_certificate::invoke(&crate::bindings::pulumi::cloudflare::get_origin_ca_root_certificate::Args {
algorithm: &args.algorithm.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_origin_ca_root_certificate::invoke(
&crate::bindings::pulumi::cloudflare::get_origin_ca_root_certificate::Args {
algorithm: &args.algorithm.get_inner(),
}
);

GetOriginCaRootCertificateResult {
algorithm: crate::into_domain(result.algorithm),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,15 +152,19 @@ pub struct GetRecordResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetRecordArgs) -> GetRecordResult {
pub fn invoke(
args: GetRecordArgs
) -> GetRecordResult {

let result = crate::bindings::pulumi::cloudflare::get_record::invoke(&crate::bindings::pulumi::cloudflare::get_record::Args {
content: &args.content.get_inner(),
hostname: &args.hostname.get_inner(),
priority: &args.priority.get_inner(),
type_: &args.type_.get_inner(),
zone_id: &args.zone_id.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_record::invoke(
&crate::bindings::pulumi::cloudflare::get_record::Args {
content: &args.content.get_inner(),
hostname: &args.hostname.get_inner(),
priority: &args.priority.get_inner(),
type_: &args.type_.get_inner(),
zone_id: &args.zone_id.get_inner(),
}
);

GetRecordResult {
content: crate::into_domain(result.content),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,18 @@ pub struct GetRulesetsResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetRulesetsArgs) -> GetRulesetsResult {
pub fn invoke(
args: GetRulesetsArgs
) -> GetRulesetsResult {

let result = crate::bindings::pulumi::cloudflare::get_rulesets::invoke(&crate::bindings::pulumi::cloudflare::get_rulesets::Args {
account_id: &args.account_id.get_inner(),
filter: &args.filter.get_inner(),
include_rules: &args.include_rules.get_inner(),
zone_id: &args.zone_id.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_rulesets::invoke(
&crate::bindings::pulumi::cloudflare::get_rulesets::Args {
account_id: &args.account_id.get_inner(),
filter: &args.filter.get_inner(),
include_rules: &args.include_rules.get_inner(),
zone_id: &args.zone_id.get_inner(),
}
);

GetRulesetsResult {
account_id: crate::into_domain(result.account_id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,16 @@ pub struct GetTunnelResult {
///
/// Registers a new resource with the given unique name and arguments
///
pub fn invoke(args: GetTunnelArgs) -> GetTunnelResult {
pub fn invoke(
args: GetTunnelArgs
) -> GetTunnelResult {

let result = crate::bindings::pulumi::cloudflare::get_tunnel::invoke(&crate::bindings::pulumi::cloudflare::get_tunnel::Args {
account_id: &args.account_id.get_inner(),
name: &args.name.get_inner(),
});
let result = crate::bindings::pulumi::cloudflare::get_tunnel::invoke(
&crate::bindings::pulumi::cloudflare::get_tunnel::Args {
account_id: &args.account_id.get_inner(),
name: &args.name.get_inner(),
}
);

GetTunnelResult {
account_id: crate::into_domain(result.account_id),
Expand Down
Loading

0 comments on commit 7ab4f97

Please sign in to comment.